GitHub

Button

The Button component triggers a defined action. Button labels should clearly indicate the action that will be performed upon interaction.

Preview

variant

size

API Reference

proptypedefaultdescription
packagetyping.Literal['flect']flectNone
class_nametyping.Optional[str]NoneSpecifies the Tailwind CSS classes for the component.
childrenflect.components.AnyComponents[]The children of the component.
varianttyping.Literal['default', 'destructive', 'outline', 'secondary', 'ghost', 'link']defaultDetermines the button's style variant.
sizetyping.Literal['default', 'sm', 'lg', 'icon']defaultDetermines the button's size.
on_click_actiontyping.Optional[typing.Annotated[typing.Union[flect.actions.DispatchEvent, flect.actions.Notify, flect.actions.Redirect], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]NoneDefines the action to be performed when the button is clicked.