Button
Button
Modified button component (type=button by default), it can do loading and add Addons to itself 💪
jsx
import Button from '@semcore/ui/button';
<Button />;ButtonProps
& & {...}| Name | Type | Description |
|---|---|---|
| active | boolean | Button activity state |
| disabled | boolean | Disabled button state |
| loading | boolean | Loading button state |
| addonLeft | Tag for the left Addon | |
| addonRight | Tag for the right Addon | |
| hintPlacement | ["placement"] | Placement for hint |
| size | "l" | "m" | Button size. |
| use | "primary" | "secondary" | "tertiary" | Button usage. |
| theme | "info" | "success" | "brand" | "danger" | "muted" | "invert" | Button theme. |
Button.Addon
The addon is inside the button (most often an icon), it sets the correct margins depending on the size. It takes all properties of the Box.
jsx
import Button from '@semcore/ui/button';
<Button.Addon />;Button.Text
Plain text with predefined paddings depending on the size. Accepts all properties of Text.
If only text with no addons is used, it will be wrapped in Button.Text automatically.
jsx
import Button from '@semcore/ui/button';
<Button.Text />;ButtonLink
Modified button component (type=button by default) with display as link.
jsx
import { ButtonLink } from '@semcore/ui/button';
<Button />;ButtonLinkProps
& {...}| Name | Type | Description |
|---|---|---|
| use | "primary" | "secondary" | Button link type |
Last updated: