Buttons are used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
blockfalsealigncenterblock. Can be start or centerasbuttonbutton or a.button<button> element (bindable).<Button size="x-small">X-Small Button</Button>
<Button size="small">Small Button</Button>
<Button size="medium">Medium Button</Button>
<Button size="large">Large Button</Button> <Button color="accent" variant="fill">Fill Button</Button>
<Button color="gray" variant="fill">Fill Button</Button>
<Button color="green" variant="fill">Fill Button</Button>
<Button color="red" variant="fill">Fill Button</Button>
<Button color="blue" variant="fill">Fill Button</Button>
<Button color="orange" variant="fill">Fill Button</Button> <Button color="accent" variant="outline">Outline Button</Button>
<Button color="gray" variant="outline">Outline Button</Button>
<Button color="green" variant="outline">Outline Button</Button>
<Button color="red" variant="outline">Outline Button</Button>
<Button color="blue" variant="outline">Outline Button</Button>
<Button color="orange" variant="outline">Outline Button</Button> <Button color="accent" variant="outline-fill">Outline-fill Button</Button>
<Button color="gray" variant="outline-fill">Outline-fill Button</Button>
<Button color="green" variant="outline-fill">Outline-fill Button</Button>
<Button color="red" variant="outline-fill">Outline-fill Button</Button>
<Button color="blue" variant="outline-fill">Outline-fill Button</Button>
<Button color="orange" variant="outline-fill">Outline-fill Button</Button> <Button color="accent" variant="invisible">Invisible Button</Button>
<Button color="gray" variant="invisible">Invisible Button</Button>
<Button color="green" variant="invisible">Invisible Button</Button>
<Button color="red" variant="invisible">Invisible Button</Button>
<Button color="blue" variant="invisible">Invisible Button</Button>
<Button color="orange" variant="invisible">Invisible Button</Button> default - The content (label) of the button.
<Button>Search</Button> start - Placed before the content (e.g. icon).
<Button>
<IconSearch slot="start" />
Search
</Button> end - Placed after the content (e.g. icon).
<Button>
Search
<IconSearch slot="end" />
</Button> action - Placed after the content, locked to the right side of the button. This is useful with the block property.
<Button block color="gray">
<IconSearch slot="start" />
Search
<IconCaretDown slot="action" />
</Button> The as property can be used to render the button as a link.
<Button as="a" href="https://hyvor.com" target="_blank">
HYVOR <IconBoxArrowUpRight slot="end" />
</Button> The Loader component can be used to indicate a loading state.
<Button>
Submit
<Loader slot="action" size="small" invert />
</Button> You can use the disabled attribute to disable a button.
<Button disabled>Disabled Button</Button> You can use the ButtonGroup component to group buttons together.
<ButtonGroup>
<Button>Button 1</Button>
<Button>Button 2</Button>
<Button>Button 3</Button>
</ButtonGroup>