Button
Overview
When to use
t.b.d.
When to consider an alternative
t.b.d.
Component
Default
Displays a button with the provided label text. By default, it has a primary visual style.
Variant
Use the variant prop to change the visual style of the button. The available variants are Button.ButtonVariants.primary, Button.ButtonVariants.secondary and Button.ButtonVariants.ghost.
With Icons
Include icons on the left or right side of the button using the iconLeft and iconRight props. These props accept an icon component <Icon />
Disabled
Set the disabled prop to true to create a button that cannot be clicked
Link or Button
Provide an href prop to create a link button. The button will render as an anchor tag with the provided href.
Properties
Default
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| utilClassNames | String | false | - | |
| children | Node | false | - | |
| buttonRef | Shape {
"current": "Any"
} | false | - | |
| disabled | Bool | false | - | |
| href | String | false | - | |
| variant | Enum Button.Variants.primary │ Button.Variants.secondary │ Button.Variants.ghost | false | primary | Exported as `Button.Variants.primary` etc. |
| iconLeft | Node | false | - | |
| iconRight | Node | false | - | |
| label | String | false | - |