block
boolean
If set to `false` component renders with `width : auto`, otherwise `width : full`.
A button but with secondary styling.
<Button variant="textSecondary">A button</Button>
<Button disabled>A button</Button>
<Button onClick={function noRefCheck() {}}>Button with onClick</Button>
The button will take up all available space if block
is passed as true
.
<Button block>Block button</Button>
<Button icon={<ChatIcon />}>Chat</Button>
Show an icon at the end after the button contents
<Buttonicon={<ChatIcon />}iconPosition="end">Chat</Button>
Only show an icon, only use when the icon is very clear by itself and always combine with a label for assistive devices.
<Buttonicon={<ChatIcon />}variant="icon">Chat</Button>
The button will take up all available space in place of the content if loading
is passed as true
and disables interaction.
<Flex gap="4px"><ButtononClick={function noRefCheck() {}}>Click me to load something!</Button><Button onClick={function noRefCheck() {}}>Reset</Button></Flex>
block
boolean
If set to `false` component renders with `width : auto`, otherwise `width : full`.
loading
boolean
If set to `true`, disables the button and shows a `Spinner` component in place of the child content.
variant
"icon" | "text" | "textSecondary"
Default: "text"
icon
ReactNode
iconPosition
"end" | "start"
Default: "start"
atoms
Applies permitted design system styles. See styling documentation for more.