ComponentsButton

Button

Button component is used to trigger an action or event.

Usage
import { HvButton } from "@hitachivantara/uikit-react-core";
Source
Package

Variants

xssmmdlgxl

nonebaseroundcirclefull

Sizes

Icon

Use the startIcon or endIcon props to insert an icon on the button. You can also use an icon directly as a child of the HvButton component if you only want a clickable icon. In this case it might be useful to check the HvIconButton component as it wraps the clickable icon with an HvTooltip component.

Custom root component

You can use the component prop to change the root component of the button to be other than button whether it’s a native HTML element or your own custom React component.

Semantic buttons

If you need a button that exists on a semantic container you can set the variant prop to semantic.

Focusable when disabled

If you still need the button to be focusable when disabled for accessibility purposes, you can set the focusableWhenDisabled property to true. When using this property, the buttons will continue to be read by screen readers when disabled.