Button code
Import
API
Parameters
- Any props that can be passed to an HTML button element.
sentiment
- Determines the theme of the button. Defaults toaction
.usage
- Determines the visual style of the button. Defaults tofilled
.size
- Determines the size of the button. Defaults tolg
endIcon
- Determines the icon to display at the end of the button.startIcon
- Determines the icon to display at the start of the button.
Size Mapping
md
: Use in condensed areas where the default size is too large.lg
: Should be used in most, if not all cases.
Customizing
There are 3 ways to customize the Button component: using the button recipe, extending the recipe, or passing a className prop.
Button recipe
Pando makes use of the
There are a number of variants available for the button recipe:
palette:
“action” | “neutral” | “danger”
size:
“md” | “lg”
usage:
“text” | “outline” | “filled”
Extending the Button recipe
Using
Passing a className
prop
You can pass a className prop to the Button component to customize the Button. This is useful if your project uses