FoundationsButtonDeprecated
Button
Buttons allow users to perform an action or to navigate to another page / view.
ActionButtonProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
children | ReactNode | — | — | Provide arbitrary element(s) to the button. The `icon*` and `label` properties will no-longer apply. |
disabled | boolean | — | — | Whether the button should be disabled or not |
iconAfter | ComponentType<IconProps> | — | — | An icon or element rendered after the button label. |
iconBefore | ComponentType<IconProps> | — | — | An icon or element rendered before the button label. |
label | string | — | — | The label of the button. |
type | submit|button|reset | — | — | Provide an alternate type if the button is within a form. |
weight | bold|subtle | — | — | The weight of the button. |
Also accepts HTMLAttributes<HTMLButtonElement> | ||||
DeprecatedButtonProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
block | boolean | — | false | When true, the button will fill the available width of its container. |
disabled | boolean | — | false | When true, the button will be disabled. |
iconAfter | ComponentType<IconProps> | — | — | An element rendered after the button content. |
iconBefore | ComponentType<IconProps> | — | — | An element rendered before the button content. |
label | string | Yes | — | The label of the button. |
loading | boolean | — | false | When true, the button will display a loading spinner. |
size | Sizesmall|medium | — | medium | The size of the button. |
tone | active|critical | — | active | The tone that is conveyed by the button. |
type | submit|button|reset | — | — | Provide an alternate type if the button is within a form. |
weight | bold|subtle | — | bold | The weight of the button. |