An icon button is a button that displays only an icon without a visual label.
<nve-icon-button icon-name="menu"></nve-icon-button>
Installation
<script type="module">
import '@nvidia-elements/core/icon-button/define.js';
</script>
<nve-icon-button icon-name="menu"></nve-icon-button>
nve api.get nve-icon-button
Interactions
Icon buttons with different interaction styles including default, emphasis, destructive, and disabled states.
<nve-icon-button icon-name="menu"></nve-icon-button>
<nve-icon-button interaction="emphasis" icon-name="menu"></nve-icon-button>
<nve-icon-button interaction="destructive" icon-name="menu"></nve-icon-button>
<nve-icon-button disabled icon-name="menu"></nve-icon-button>
Flat Interactions
Flat container icon buttons with interaction styles for minimal visual weight in dense toolbars.
<nve-icon-button container="flat" icon-name="menu"></nve-icon-button>
<nve-icon-button container="flat" interaction="emphasis" icon-name="menu"></nve-icon-button>
<nve-icon-button container="flat" interaction="destructive" icon-name="menu"></nve-icon-button>
<nve-icon-button container="flat" icon-name="menu" disabled></nve-icon-button>
Pressed/Toggle
Indicates the current state of a toggle button that switches on or off. MDN
Pressed Description true The button is in the pressed (on) state and the associated action or setting is active. false The button is in the unpressed (off) state and the associated action or setting is inactive.
Icon buttons with pressed state for toggle functionality like filters or visibility controls.
<nve-icon-button pressed icon-name="filter-stroke"></nve-icon-button>
<nve-icon-button icon-name="filter"></nve-icon-button>
Pressed Flat
Flat icon buttons with pressed state for low-emphasis toggles and compact toggle controls.
<nve-icon-button pressed container="flat" icon-name="eye-hidden" aria-label="show"></nve-icon-button>
<nve-icon-button container="flat" icon-name="eye" aria-label="hide"></nve-icon-button>
Pressed Inline
Inline icon buttons with pressed state for minimal toggle controls within text or content flows.
<nve-icon-button pressed container="inline" icon-name="eye-hidden" aria-label="show"></nve-icon-button>
<nve-icon-button container="inline" icon-name="eye" aria-label="hide"></nve-icon-button>
Selected
Indicates whether an element currently holds selection within a multi-option selection group. MDN
Selected Description true The element holds selection and represents the user's current choice within the group. false The element does not hold selection and the user can choose it.
Icon buttons with selected state for mutually exclusive options like view modes or layout choices.
<nve-icon-button selected icon-name="split-vertical" aria-label="split vertical"></nve-icon-button>
<nve-icon-button icon-name="split-horizontal" aria-label="split horizontal"></nve-icon-button>
<nve-icon-button icon-name="split-none" aria-label="preview"></nve-icon-button>
Selected Flat
Flat icon buttons with selected state for low-emphasis mode selection in compact toolbars.
<nve-icon-button selected container="flat" icon-name="split-vertical" aria-label="split vertical"></nve-icon-button>
<nve-icon-button container="flat" icon-name="split-horizontal" aria-label="split horizontal"></nve-icon-button>
<nve-icon-button container="flat" icon-name="split-none" aria-label="preview"></nve-icon-button>
Selected Inline
Inline icon buttons with selected state for minimal mode selection within content flows.
<nve-icon-button selected container="inline" icon-name="split-vertical" aria-label="split vertical"></nve-icon-button>
<nve-icon-button container="inline" icon-name="split-horizontal" aria-label="split horizontal"></nve-icon-button>
<nve-icon-button container="inline" icon-name="split-none" aria-label="preview"></nve-icon-button>
Link
Anchors can wrap button instances, but its recommended to slot the anchor into the button.
<!-- do -->
<nve-icon-button icon-name="menu">
<a href="#" aria-label="link to page"></a>
</nve-icon-button>
<!-- don't -->
<a href="#" aria-label="link to page">
<nve-icon-button container="flat" icon-name="menu"></nve-icon-button>
</a>
Proper implementation of icon buttons with links, showing correct and incorrect anchor placement patterns.
<nve-icon-button icon-name="menu">
<a href="#" aria-label="link to page"></a>
</nve-icon-button>
Custom Icon
Icon buttons with custom content like text initials, emojis, or symbols for personalized actions.
<nve-icon-button interaction="emphasis">ML</nve-icon-button>
<nve-icon-button>🎉</nve-icon-button>
<nve-icon-button> 🔗 <a href="#" aria-label="custom icon button"></a> </nve-icon-button>
Themes
Icon buttons styled for light and dark themes with all interaction states for theme consistency.
<div nve-theme="root light">
<nve-icon-button icon-name="menu"></nve-icon-button>
<nve-icon-button interaction="emphasis" icon-name="menu"></nve-icon-button>
<nve-icon-button interaction="destructive" icon-name="menu"></nve-icon-button>
<nve-icon-button container="flat" icon-name="menu"></nve-icon-button>
<nve-icon-button disabled icon-name="menu"></nve-icon-button>
</div>
<div nve-theme="root dark">
<nve-icon-button icon-name="menu"></nve-icon-button>
<nve-icon-button interaction="emphasis" icon-name="menu"></nve-icon-button>
<nve-icon-button interaction="destructive" icon-name="menu"></nve-icon-button>
<nve-icon-button container="flat" icon-name="menu"></nve-icon-button>
<nve-icon-button disabled icon-name="menu"></nve-icon-button>
</div>
Size
Icon buttons in different sizes (small, medium, large) for varying contexts and visual hierarchy.
<nve-icon-button size="sm" icon-name="menu"></nve-icon-button>
<nve-icon-button icon-name="menu"></nve-icon-button>
<nve-icon-button size="lg" icon-name="menu"></nve-icon-button>
Release Status
All elements and features go through 3 phases of stability, pre-release, beta and stable.
pre-release
Docs Preview
API Documentation
Fully Themeable
beta
Robust unit test coverages
Passed API Review
Passed Designer VQA Review
Included in library package
stable
No known outstanding AA WCAG issues
No known outstanding performance issues
Adapts to different screen/container sizes
No breaking API changes for at least 90 days