Skip to Content
DocumentationButton

Button

Displays a button or a component that looks like a button.

Examples

Regular

Emphasis

Error

Warning

Success

Outlined

Gradient

Medbrain

Sizes

With Icon

With Badge

1
2
3
4
5

With Alert

Loading

Disabled

API

PropertyTypePossible valuesDefaultDescription
variant”regular” | “regular-soft” | “regular-basic” | “emphasis” | “emphasis-soft” | “emphasis-basic” | “error” | “error-soft” | “error-basic” | “warning” | “warning-soft” | “warning-basic” | “success” | “success-soft” | “success-basic” | “outlined” | “gradient” | “medbrain""regular”, “regular-soft”, “regular-basic”, “emphasis”, “emphasis-soft”, “emphasis-basic”, “error”, “error-soft”, “error-basic”, “warning”, “warning-soft”, “warning-basic”, “success”, “success-soft”, “success-basic”, “outlined”, “gradient”, “medbrain""regular”Sets the visual style of the button.
size”sm” | “md” | “lg” | “xl""sm”, “md”, “lg”, “xl""md”Sets the size of the button.
asChildbooleantrue, falsefalseChange the default rendered element for the one passed as a child, merging their props and behavior.
containerClassNamestring--Class name for the container element.
iconLeftReact.ReactElement--Icon displayed to the left of the button content.
iconRightReact.ReactElement--Icon displayed to the right of the button content.
badgenumber | string--Shows a badge with the specified value in the top-right corner of the button.
loadingbooleantrue, falsefalseShows a loading indicator and disables the button.
alertstring (color)--Shows an animated alert circle with the specified color to the left of the button content.
disabledbooleantrue, falsefalseDisables the button (inherited from button).
…propsAll native button props--Allows passing any other standard properties of a button element.
Last updated on