Sizes
Icon
Use the startIcon
or endIcon
props to add icons to a button. You can also use the icon
prop to pass an icon directly as a child of HvButton
.
For icon-only buttons, prefer using HvIconButton
, which wraps the icon in a HvTooltip
and enforces an accessible title
for better usability.
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 needed for accessibility, set focusableWhenDisabled
to true
to keep the button focusable and readable by screen readers, even when disabled.