Overview

Ok

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

© 2021-2023 Red Hat, Inc. Deploys by Netlify