Icon Button
Icon buttons render an icon-only action without a visible text label. Use them sparingly where space is constrained and the icon is unambiguous.
Ready to use
Icon Buttons are circular interactive elements that display a single icon to trigger an action or represent a state. They’re used when an action can be represented visually — Close, Play, Next — without the need for text. The component is fully responsive and intentionally designed to be used across all viewports, with no alternative versions required.
Anatomy
Section titled “Anatomy”- Icon button
- Icon
When to use it
Section titled “When to use it”Use Icon Buttons when:
- The action is simple and universally recognisable (play, pause, close, next, previous).
- Text would crowd the surface but the meaning of the icon is clear in context.
- The control sits in regular page chrome and a circular affordance fits the layout.
Avoid Icon Buttons when:
- A label is needed for clarity — use a standard Button instead.
- The icon’s meaning is ambiguous and there’s no tooltip to clarify it.
- The action is play/pause inside a media surface — reach for the Media Button instead.
Properties
Section titled “Properties”Type
Two visual styles: Filled (solid background, no border) and Outlined (transparent background with a 1px border). Pick filled for emphasis on neutral surfaces, outlined when the button should sit lighter inside a busy layout.
Size
Four sizes — XS (22×22), SM (32×32), MD (40×40), and LG (80×80) — with matching icon glyphs. Choose the smallest size that still clears the 24×24 minimum touch area; LG suits hero or focal controls.
State
Rested, Hover, Active, Focus, and Disabled. Hover and focus styles are intentionally distinct so keyboard users get a clear ring; disabled state mutes both fill and icon.
Contrast
A boolean that flips the colour set for use over dark imagery or high-contrast surfaces. Use the contrast variant when the surrounding scheme calls for inverted foreground colours.
Background
A boolean that toggles the filled background on or off. Turning it off leaves a transparent button that relies on the icon alone — useful in compact toolbars where the fill would feel heavy.
Platform considerations
Section titled “Platform considerations”Desktop
Pointer accuracy is high, but keep the visible size at MD or above for primary actions so the target stays comfortable to click.
Tablet
Touch is mixed with pointer here. Don’t drop below SM and respect the 44×44 px recommended touch area for any control the user repeats.
Mobile
Mobile is touch-first. Aim for MD or LG for any button the user reaches for repeatedly, and keep generous spacing around adjacent buttons.
Best practices
Section titled “Best practices”Treat Icon Buttons as glyph-only — readability and a clear accessible name carry all the meaning.
Do
Always provide an ARIA label that names the action (“Close”, “Play video”), keep hover and focus styles visually distinct so keyboard users get clear feedback, and respect the minimum 24×24 px touch area (44×44 recommended).
Don't
Don’t reach for an Icon Button when the icon’s meaning depends on context — pair it with a tooltip or use a standard button instead. Don’t use it for navigation unless the glyph reads unambiguously, and don’t fold focus and hover into one shared state.
Content guidelines
Section titled “Content guidelines”Icon Buttons are icon-only, so the accessible name does all the work. Write a short verb phrase that describes the action from the user’s perspective — “Close”, “Play video”, “Next slide” — not the icon name. Update the label when the action toggles (an aria-label that says “Play” while the icon is showing “pause” is worse than no label at all). Keep wording consistent across the product so screen-reader users recognise familiar actions.
Styles
Section titled “Styles”Variants
Section titled “Variants”<button class="tng-icon-button" aria-label="Download"> <i class="tng-icon icon-download" aria-hidden="true"></i></button><button class="tng-icon-button is-outlined" aria-label="Bookmark"> <i class="tng-icon icon-bookmark" aria-hidden="true"></i></button><button class="tng-icon-button is-ghost" aria-label="External link"> <i class="tng-icon icon-external-link" aria-hidden="true"></i></button>The default size is sm.
<button class="tng-icon-button is-xs" aria-label="Search"> <i class="tng-icon icon-search" aria-hidden="true"></i></button><button class="tng-icon-button is-sm" aria-label="Search"> <i class="tng-icon icon-search" aria-hidden="true"></i></button><button class="tng-icon-button is-md" aria-label="Calendar"> <i class="tng-icon icon-calendar" aria-hidden="true"></i></button><button class="tng-icon-button is-lg" aria-label="Confirm"> <i class="tng-icon icon-check" aria-hidden="true"></i></button>States
Section titled “States”<button class="tng-icon-button" disabled aria-label="Download"> <i class="tng-icon icon-download" aria-hidden="true"></i></button><button class="tng-icon-button is-outlined" disabled aria-label="External link"> <i class="tng-icon icon-external-link" aria-hidden="true"></i></button><button class="tng-icon-button is-ghost" disabled aria-label="External link"> <i class="tng-icon icon-external-link" aria-hidden="true"></i></button>Description
Section titled “Description”The Icon Button is an interactive component that wraps an icon inside a button element. It supports event handling, accessibility, making it suitable for actions in menus, carousel, overlay, etc.
Component
Section titled “Component”Properties
Section titled “Properties”Icons reference icons.
The IconButtonProperties extends <React.HTMLAttributes<HTMLButtonElement> which means it includes all standard HTML attributes that can be applied to an HTML Button element.
| Prop | Type | Description | Optional |
|---|---|---|---|
iconName |
ToyotaIcon | LexusIcon |
The rendered Icon inside button component from the library | ❌ |
size |
Size |
Defines the size of the button | ✅ |
isOutlined |
boolean |
Display the button with outlined style (no border, no background-color) | ✅ |
isNeutral |
boolean |
Display the button with neutral style | ✅ |
className |
ClassValue |
Custom classNames you want to apply on the button element | ✅ |
screenReaderText |
string |
Accessibility label used for screen readers | ✅ |
Example
Section titled “Example”import { IconButton } from '@tmedxp/react-components';
const IconButtonExample = () => { return ( <IconButton iconName="travel" size="lg" isOutlined={true} isNeutral={true} /> );};
export { IconButtonExample };An icon button is a native <button> with no visible text — so its whole accessibility rests on two things: an explicit accessible name that stands in for the missing label, and an icon that stays out of the accessibility tree. Get those right and the native element carries the role, keyboard operation, and focus for free. An accessible icon button meets WCAG 2.1 AA: it names its action for assistive technology, keeps its state announced, and stays operable and legible whether the user sees it, hears it, or tabs to it.
For designers
Section titled “For designers”- The glyph and every state — hover, focus, disabled, and the contrast variant placed over imagery — must maintain accessible contrast on every supported surface. Source: WCAG 1.4.3 Contrast (Minimum).
- With no text to lean on, meaning rests entirely on the glyph — never let colour alone distinguish one state or action from another; the icon’s shape must carry it. Source: WCAG 1.4.1 Use of Color.
- Focus styles must stay visible, meet contrast requirements on every supported surface, and be clearly distinguishable from hover. Source: WCAG 2.4.7 Focus Visible.
- Keep the interactive target at least 44 × 44 px — when the visible glyph is smaller, extend the hit area with padding rather than shrinking the target. Source: WCAG 2.5.8 Target Size (Minimum).
- Use semantic colour tokens (e.g.
foreground/neutral/default) rather than fixed values, so the component adapts correctly across themes and surfaces.
For developers
Section titled “For developers”An icon button is a native <button>, so it carries the button role, Enter / Space activation, and focus behaviour on its own — never rebuild one from a <div> or <span>. Its one hard requirement is an accessible name: with no visible text, give every icon button an aria-label that names the action (“Close”, “Play video”), not the icon. Beyond naming, the wiring depends on what the button does — a plain action, a toggle, or a disclosure — and the glyph must stay out of the accessibility tree; those per-case roles, names, and states are in the Labelling elements section below. Keep the interactive target at least 44 px high for comfortable touch use — comfortably clearing the WCAG AA minimum. Source: WCAG 2.5.8 Target Size (Minimum).
Labelling elements
Section titled “Labelling elements”Give every element the role, name, and state assistive technology needs.
Button
A native <button>, so the role comes for free. Because there’s no visible text, it has no accessible name of its own — set one with aria-label naming the action (“Close”, “Next slide”), never the icon. When a visible label or persistent tooltip exists, wire the name with aria-labelledby instead.
Icon
The glyph is decorative — it restates the action the label already names. Mark it aria-hidden="true" so it never announces as a separate node, leaving the button’s aria-label as the single accessible name.
Toggle / pressed state
A button that flips between two states (bookmark on/off, mute/unmute) keeps aria-pressed in sync — "true" when active, "false" when not. A disclosure button that shows or hides content uses aria-expanded the same way. Keep the aria-label stable across the toggle so it never contradicts the glyph.
Disabled
Use the native disabled attribute rather than a class or aria-disabled alone, so the button leaves the tab order and announces as unavailable. Keep the button in place rather than removing it when the action is only temporarily unavailable, so its position stays discoverable.
Source: WCAG 4.1.2 Name, Role, Value.