Skip to main content
Version: 57.2.0

Button

Buttons allow users to perform actions within a surface. They can be used alone for immediate action. Also known as CTA (call to action).

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

Live demo

Props

PropTypeRequiredDescription
onClickreflectionYesThe function to call when the button is clicked.
textstringYesThe text content of the button.
confirmationTextstringThe text content of the confirmation modal.
disabledbooleanIf true, the button will be disabled.
fullWidthbooleanIf true, the button will take the full width of its container.
iconNameIconNameThe name of the icon to display in the button.
iconPositionunionThe position of the icon within the button.
loadingbooleanIf true, a loading spinner will be shown in the button.
modalSubTitlestringThe subtitle of the confirmation modal.
modalTitlestringThe title of the confirmation modal.
pressAnimationButtonPressAnimationThe press animation to use when the button is touched.
sizeunionThe size of the button.
testIDstringRoot test id for the primary interactive element or container.
tooltipIdealPositionTooltipPositionThe position of the tooltip.
tooltipIncludeArrowbooleanInclude an arrow in the tooltip. Pointing to the button.
tooltipTextstringThe text content of the tooltip.
variantunionThe type of the button, which determines its style.
withConfirmationbooleanIf true, a confirmation modal will be shown before the onClick action.