@rhds/elements
Version:
Red Hat Design System Elements
51 lines (32 loc) • 1.26 kB
Markdown
Icons represents general concepts and can support text as a decorative element.
The `<rh-icon>` element allows content and experience authors to add Red Hat icons
of varying dimensions in the same area without shifting surrounding content.
- When you want to supplement the meaning of text with a visual element
- When you need to represent a UI function with an approved Red Hat icon
- When you need an icon to occupy a certain amount of space
[](https://red-hat-icons.netlify.app/) standard (default), microns, UI, and social.
```html
<rh-icon icon="alert"></rh-icon>
```
```html
<rh-icon set="microns" icon="checkbox-complete-fill"></rh-icon>
```
```html
<rh-icon set="ui" icon="check-circle-fill"></rh-icon>
```
```html
<rh-icon set="social" icon="facebook"></rh-icon>
```
Icons load _lazily_ by default, meaning that the browser will not attempt to fetch and render the
icon until it scrolls into view. You can change this with the `loading` attribute;
see the [docs][docs] for more info.
[]: https://ux.redhat.com/elements/icon
[]: https://ux.redhat.com/elements/icon/guidelines/