Staffbase

Components

Button

Buttons trigger an action or event, such as submitting a form, opening a dialog, or performing a destructive action.

Anatomy

Anatomy
import {Button} from '@staffbase/design';

<Button />;

Examples

Variants

Colors

With icons

Icon only

Use iconOnly to make the padding even so the button renders as a square.

With tooltip

Use Tooltip with is="label" to provide an accessible name for icon-only buttons. The tooltip text becomes the button’s label for assistive technology.

API reference

Button

Name Type Description
children
ReactNode
The content of the button. Can be text, icons, or both.
variant
solidoutlineghost
The visual style of the button.
Default: solid
color
primaryneutralcritical
The color scheme of the button.
Default: primary
iconOnly
boolean
Makes the button square with even padding, for icon-only buttons. Pair with aria-label for accessibility.
Default: false