Skip to main content
Version: 57.2.0

IconButton

Icon buttons allow users to take actions and make choices with a single tap.

Package: @terreno/ui
Categories: Component
Props interface: IconButtonProps
Story source: demo/stories/IconButton.stories.tsx

Live demo

Props

PropTypeRequiredDescription
accessibilityLabelstringYesThe accessibility label attribute identifies the user interface element. It should be a very brief description of the element, such as "Add", "Play", "Deleted", etc.
iconNameIconNameYesThe name of the icon to display in the button.
onClickreflectionYesThe function to call when the button is clicked.
accessibilityHintstringThe accessibility hint describes the results of performing an action on a control or view. It should be a very brief description of the result of interacting with the button.
confirmationHeadingstringThe heading of the confirmation modal.
confirmationTextstringThe text content of the confirmation modal.
disabledbooleanIf true, the button will be disabled.
indicatorunionShow a small indicator icon in the lower right corner of the button.
indicatorTextunionThe text or number to display in the indicator. If not provided, the indicator will be a solid circle.
loadingbooleanIf true, a loading spinner will be shown in the button.
sizeunionThe size of the button.
stateunionControls the button's interaction state. Use Default for standard button appearance and Active to indicate a selected or currently engaged state.
testIDstringRoot test id for the primary interactive element or container.
tooltipIdealPositionTooltipPositionThe ideal position of the tooltip.
tooltipIncludeArrowbooleanInclude an arrow in the tooltip. Pointing to the button.
tooltipTextstringThe text content of the tooltip.
variantunionThe variant of the button, which determines its style.
withConfirmationbooleanIf true, a confirmation modal will be shown before the onClick action.