Button
Overview
Installation
npm install @rhds/elements
Usage
Slots
icon
-
Contains the button's icon or state indicator, e.g. a spinner.
Attributes
variant
-
Changes the style of the button.
- Primary: Used for the most important call to action on a page. Try to limit primary buttons to one per page.
- Secondary: Use secondary buttons for general actions on a page, that don’t require as much emphasis as primary button actions. For example, you can use secondary buttons where there are multiple actions, like in toolbars or data lists.
- Tertiary: Tertiary buttons are flexible and can be used as needed.
- DOM Property
variant
- Type
-
'primary' | 'secondary' | 'tertiary' | 'close' | 'play'
- Default
-
'primary'
danger
-
When set, indicates that the button performs a destructive action
- DOM Property
danger
- Type
-
boolean
- Default
-
false
Methods
None
Events
None
CSS Custom Properties
None
CSS Shadow Parts
icon
-
Container for the icon slot
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit