SfButton is an input that allows for user-triggered actions when clicked or pressed. This can be used for submitting forms, opening/closing dialogs, and much more.
SfButton supports 3 sizes that can be set with the
SfButton supports 3 style variants that can be set via
This component can be used as a link (or any other tag) that can be set via
You can create a full-width button with Tailwind's
You can truncate button content with Tailwind using
slotSuffix props that you can use to add custom content before/after your default content. This can be useful for adding icons or badges to your buttons.
Button component can be rendered as
<a> or any other tag by providing it with prop
as. When rendered as
<button> this component applies default
type='button' if no other
type is passed as a prop.
Avoid using buttons to navigate the page. Use links or tabs.
If you need to use Button with non-
<button> tags like
<div> you need to add
role='button'. When this role is added to an element, the browser will send out an accessible alert event to assistive technology products which can then notify the user. You can override this behaviour by passing
role prop by yourself.