Summary
Functions
Attributes
size(:string) - button sizes; icon renders a square, md-height icon button (pair with an aria-label). Defaults to"md". Must be one of"xs","sm","md","lg","xl", or"icon".radius(:string) - button border radius; when unset the --pc-radius theme token applies. Defaults tonil. Must be one ofnil,"none","sm","md","lg","xl", or"full".variant(:string) - button variant. solid/soft/light/outline/ghost are the supported fill styles (soft adapts its tint to dark mode; light stays light in both modes). inverted and shadow are legacy, slated for removal in a future major - prefer outline, and compose effects (border_beam / shine_border) for flourish. Defaults to"solid". Must be one of"solid","soft","light","outline","inverted","shadow", or"ghost".color(:string) - button color. Defaults to"primary". Must be one of"primary","secondary","info","success","warning","danger","gray","pure_white","white","light", or"dark".to(:string) - link path. Defaults tonil.loading(:boolean) - indicates a loading state. Defaults tofalse.disabled(:boolean) - indicates a disabled state. Defaults tofalse.icon(:any) - name of a Heroicon at the front of the button. Defaults tonil.with_icon(:boolean) - adds some icon base classes. Defaults tofalse.link_type(:string) - Defaults to"button". Must be one of"a","live_patch","live_redirect", or"button".class(:any) - CSS class. Defaults tonil.label(:string) - labels your button. Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["method", "download", "hreflang", "ping", "referrerpolicy", "rel", "target", "type", "value", "name", "form"].
Slots
inner_block
Attributes
size(:string) - Defaults to"sm". Must be one of"xs","sm","md","lg", or"xl".color(:string) - Defaults to"gray". Must be one of"primary","secondary","info","success","warning","danger", or"gray".radius(:string) - button radius. Defaults to"full". Must be one of"none","sm","md","lg","xl", or"full".to(:string) - link path. Defaults tonil.loading(:boolean) - indicates a loading state. Defaults tofalse.disabled(:boolean) - indicates a disabled state. Defaults tofalse.with_icon(:boolean) - adds some icon base classes. Defaults tofalse.link_type(:string) - Defaults to"button". Must be one of"a","live_patch","live_redirect", or"button".class(:any) - CSS class. Defaults tonil.tooltip(:string) - tooltip text. Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["method", "download", "hreflang", "ping", "referrerpolicy", "rel", "target", "type", "value", "name", "form"].
Slots
inner_block