Button builder
A labeled action.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::controls::Button;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
label(label: impl Into<SharedString>) -> Self
accessible_name(name: impl Into<SharedString>) -> Self
accessible_description(description: impl Into<SharedString>) -> Self
icon_only(glyph: Icon, name: impl Into<SharedString>) -> Self
join(join: ButtonJoin) -> Self
semantic_parent(parent: impl Into<SharedString>) -> Self
icon(glyph: Icon) -> Self
icon_position(position: IconPosition) -> Self
variant(variant: ButtonVariant) -> Self
primary() -> Self
secondary() -> Self
ghost() -> Self
danger() -> Self
link() -> Self
loading(loading: bool) -> Self
full_width(full_width: bool) -> Self
track_focus(handle: &FocusHandle) -> Self
on_click(handler: impl Fn(&mut Window, &mut App) + 'static) -> Self
checked_state(checked: bool) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.
button
auth-sign-in
auth-verification
actions
content
overlay
tooltip
menu
context-menu
popover
command-palette
data-grid
toolbar
drawer
motion-flip
motion-state
animated-number
ide-shell
permission-matrix
reading-direction
hover-card
menubar
copy-button
document-tabs
anchor-list
calendar
date-range
date-time