Icon
On this page
Overview
Use to display Red Hat brand icons as decorative or informational elements.
Hidden from assistive technology by default (role="presentation"). When
accessible-label is set, gains role="img" and aria-label for screen
readers. Must not be the sole interactive element; wrap in a button or
link for keyboard access. Supports lazy, idle, and eager loading. Avoid
setting aria-hidden manually.
Edit element properties
import "@rhds/elements/rh-icon/rh-icon.js";
<rh-icon icon="hat"></rh-icon>
import { Icon } from "@rhds/elements/react/rh-icon/rh-icon.js";
// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.
export const Demo = () => (
<Icon icon="hat" />
);
Icon set to load from. Accepts 'standard' | 'ui' | 'microns' or any registered custom set name. Controls default sizing: standard=40px, ui=16px, microns=12px. Defaults to 'standard'.
Name of the icon within the specified set. When changed, triggers a new icon load. Setting to undefined clears the rendered icon. Defaults to undefined.
Accessible label for the icon. When set, applies role="img" and
aria-label so screen readers announce the icon. When absent, the
icon uses role="presentation" and is hidden from assistive technology.
USE for icons that convey meaning not present in surrounding text.
Defaults to undefined.
Controls when the icon data is fetched.
eager: loads immediately, blocking the main threadidle: waits for browser idle via requestIdleCallbacklazy(default): waits for the element to enter the viewport via IntersectionObserver. Defaults to 'lazy'.
Status
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
Planned
When to use
- 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
Icons and sets
<rh-icon> exclusively uses the official Red Hat brand icons.
Status checklist
| Property | Status | Meaning |
|---|---|---|
| Figma library |
|
Component is available in the Figma library |
| RH Elements |
|
Component is available in RH Elements |
| RH Shared Libs |
|
Component will be added to RH Shared Libs |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.