Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
When using a button please always follow a11y rules (e.g. W3C Recommendation 3.3.2 Labels or instructions) and make sure the context in which the button is located is also communicated by screen readers.
Used for "call to action", i.e. triggering the main action. There should never be more than one on a page. If you need multiple buttons for different actions, decide which action is the most important and make that the primary Button
. All other Button
components should be secondary.
If there is no primary action, all Button
components should be secondary.
The secondary Button
is the default button style and can trigger various actions. How it is used depends on its surroundings:
Button
, the Secondary style can for example be used for "Cancel" or "Abort" actions.Button
components should use the secondary style.Used for triggering a removing or deleting action. Because of its dominant coloring, it should be used sparingly. If you need multiple Destructive Button
components in one view, we recommend using a secondary Button
or Link variant instead and only use the Destructive variant to double confirm.
To add an anchor that looks like a button use the <LinkButton>
component and pass a href prop.
Name | Description | Default |
---|---|---|
size | "xs""sm""md""lg" | "md" |
variant | "primary""secondary""destructive""success" | "primary" |
fill | "solid""outline""text" | "solid" |
icon | ReactElement<any, string | JSXElementConstructor<any>> | "play" | "google" | "microsoft" | "github" | "gitlab" | "okta" | "discord" | ... 253 more ... | - |
className | string | - |
fullWidth | boolean | - |
type | "button""submit""reset" | "button" |
tooltip | Tooltip content to display on hover PopoverContent | - |
tooltipPlacement | Position of the tooltip "auto""bottom""top""left""right""bottom-start""bottom-end""top-start" | - |