Featured Icons
Combine a color variant, size, and style to match the context where the icon appears
<span class="nds-featured-icon">
<i class="hgi hgi-stroke hgi-stars"></i>
</span>
Built-in Features
Brand, success, info, warning, error, and neutral. Each sets the background and icon color automatically through design tokens.
From 32px to 56px. Icon and padding scale proportionally through the --featuredicon-size property.
Rounded square by default, with circle, outline, and dark fill options that combine freely with any color and size.
Set --featuredicon-bg and --featuredicon-color directly on the element without a variant class to create custom color pairings beyond the built-in variants.
Usage Guidelines
Best Practices
- Use featured icons to visually anchor key items in Cards, Definition Lists, and page sections where a plain icon would not stand out enough
- Use inside Alerts and Modals to reinforce the message type with a matching color variant
- Use as leading icons in Drawer navigation items to give each section a distinct visual identity
- Match the color variant to the meaning: brand for primary actions, success/error/warning for status, info for informational, neutral for general purpose
- Don't use for decorative icons that carry no meaning. A plain icon without a container is lighter and less visually demanding
- Use
nds-smin dense layouts like table rows or sidebar items. Usends-lgornds-xlfor hero sections and landing page features - Use
nds-circlewhen the icon sits next to rounded elements like avatars. Use the default rounded square for card headers and list items - Use
nds-darkwhen the icon needs to stand out on light backgrounds with stronger visual weight. Usends-outlinefor a lighter, secondary treatment - Override
--featuredicon-bgand--featuredicon-colordirectly on the element without a variant class to create custom color pairings beyond the built-in variants
Color Variants
Brand is the default color. Pick a color with a color class, the same set tags use. data-status paints the same colors and says more: it declares the state the icon reports. Use the class when you want the color, and the attribute when the icon reports an outcome. The attribute also inherits, and the class does not: an icon inside a card or a drawer item that carries data-status takes that color unless it sets its own.
| Class | Status | Description |
|---|---|---|
| none | none | Primary brand color (default). |
nds-green |
data-status="success" |
Green for positive outcomes and confirmations. |
nds-blue |
data-status="info" |
Blue for informational content and tips. |
nds-yellow |
data-status="warning" |
Yellow/amber for cautionary information. |
nds-red |
data-status="error" |
Red for errors and validation failures. |
| none | data-status="critical" |
Red, same cascade as error. Use for system-level critical alerts and outages. |
nds-neutral |
data-status="neutral" |
Gray for general purpose and default states. |
Modifier Classes
| Class | Description |
|---|---|
nds-sm |
Small size, 32px. For dense layouts and secondary features. |
nds-md |
Medium size, 40px. Default when no size is specified. |
nds-lg |
Large size, 48px. For prominent features and section headers. |
nds-xl |
Extra large, 56px. For hero sections and landing page features. |
nds-circle |
Fully rounded shape instead of the default rounded square. |
nds-outline |
Transparent background with a colored border. Lighter visual weight. |
nds-dark |
Solid filled background with white icon. Stronger visual weight for emphasis. |
CSS Custom Properties
Each knob can be set on the element itself or on any ancestor — the status cascade and host components (cards, drawer, metric) set these to color a nested featured icon.
| Property | Description |
|---|---|
--featuredicon-bg |
Background fill color. Set without a variant to create custom color pairings. |
--featuredicon-color |
Icon glyph color. Pair with --featuredicon-bg for full control. |
--featuredicon-size |
Container diameter. Icon, padding, and radius scale proportionally. The size classes (nds-sm–nds-xl) set it. |
--featuredicon-radius |
Corner rounding. Defaults to a proportional rounded square; nds-circle forces a full circle. |
--featuredicon-dark-bg |
Fill color for the nds-dark variant. |
--featuredicon-bg-forced--featuredicon-color-forced--featuredicon-dark-bg-forced |
The same three colors, set on a parent element instead. Use them when the parent must win over a variant class on the icon. The plain knobs above lose that contest. |