Shortcuts
Next region
F9
Previous region
⇧F9

DangerButton

core package4.0.1

Note: All components shown on this site are supported by the Constellation design system. To learn how to configure Theme Cosmos, visit Pega Community.

DangerButtons should be used to alert users before they perform an irreversible or dangerous action. Any other action that is not considered irreversible or dangerous should use a regular Button component.

Usage

The DangerButton is more restricted in its usage than the regular Button component. It requires a textual label and inherits other base Button props such as disabled. The only variant allowed is primary, though leaving this prop undefined will render the secondary variant. The color of the button can be updated via the urgent Theme token.

Demo coming soon.

Related components

Properties

NameDescriptionDefaultType
label*Text content for the button.string
primaryElevates emphasis for button style.falseboolean
refRef<HTMLButtonElement>