PetalComponents.Button (petal_components v3.0.1)
View SourceSummary
Functions
Attributes
size(:string) - button sizes. Defaults to"md".radius(:string) - button border radius. Defaults to"md".variant(:string) - button variant. Defaults to"solid".color(:string) - button color. Defaults to"primary".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".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".color(:string) - Defaults to"gray".radius(:string) - button radius. Defaults to"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".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
Functions
Attributes
size(:string) - button sizes. Defaults to"md".radius(:string) - button border radius. Defaults to"md".variant(:string) - button variant. Defaults to"solid".color(:string) - button color. Defaults to"primary".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".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".color(:string) - Defaults to"gray".radius(:string) - button radius. Defaults to"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".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