Skip to content

IconButton

Edit on GitHub
@volvo-cars/css v2.3.0@volvo-cars/react-icons v3.3.6

Icon buttons help people take supplementary actions with a single tap. They’re used when a compact button is required, such as in a toolbar or image list.

image

  1. Container
  2. Icon

Use Icon Buttons to display actions in a compact layout when an icon can replace a button label without ambiguity.

Icon buttons typically represent actions such as opening a menu, closing a dialog or navigating a carousel. Icon buttons can be grouped together or they can stand alone.

Showing: Icon button filled, Icon button outlined and Icon button clear

Showing: Icon button filled, Icon button outlined and Icon button clear

Icon Button Filled have higher visual impact and are best for high emphasis actions. Filled should always be used whenever an Icon Button is placed on top of media such as video and images to ensure the appropriate contrast ratios.

image

Icon Button Outlined are medium-emphasis buttons. They’re useful when an icon button needs more emphasis than a clear icon button but less than a filled icon button.

image

Icon Button Clear are low-emphasis buttons. Since they are visually indistinguishable from a non-interactive icon they should only be used when the context and placement makes it obvious that it can be interacted with, such as in a navigation bar. Comes with and without bleed.

image

Uses 40px size.

Showing icon button clear with bleed on hover

Showing icon button clear with bleed on hover.

Uses the size of the icon inside. Works well in navigations when you need to align content with margins.

Showing icon button clear without bleed on hover

Showing icon button clear without bleed on hover.

The Localized Icon Buttons are reusable UI components that display icon-based buttons with labels automatically localized to the user’s language. These buttons leverage the react-locale-provider for internationalization and react-icons for consistent iconography.

  • Close: Renders a close (X) icon with a localized label, typically used for dismissing dialogs or modals.
  • Next: Renders a right-arrow icon with a localized label, used for navigation to the next item or page.
  • Prev: Renders a left-arrow icon with a localized label, used for navigation to the previous item or page.
  • Automatic Localization: Button labels are translated based on the current locale provided by react-locale-provider.
  • Consistent Icons: Uses icons from react-icons to ensure visual consistency across the application.
  • Accessibility: Each button includes appropriate aria-label attributes for screen readers, using the localized label.

Our neutral button should be used as standard and is provided in all sizes and in all variants (filled, outlined and clear).

image

The red buttons should be used when the action of the button ends or terminates a function or setting, such as delete or remove.

image

The default state is the default state of the icon button. It is not currently being interacted with, but is available to be interacted with.

image

The hover state is shown when the user places a cursor over the link on non-touch devices.

image

The pressed state communicates a user click, tap, or press.

image

A button in a disabled state shows that an action exists, but is not available in that circumstance. This state can be used to maintain layout continuity and to communicate that an action may become available later.

image

Showing icon button in neutral in light color mode

Showing icon button in neutral in light color mode.

Showing icon button in destructive in light color mode

Showing icon button in destructive in light color mode.

This is the default color mode on top of imagery.

Showing icon button in neutral in dark color mode

Showing icon button in neutral in dark color mode.

Showing icon button in destructive in dark color mode

Showing icon button in destructive in dark color mode.

Icon button uses 40px target size

image

When used together, Icon button filled have a 16 spacer in between

When used together, Icon button filled have a 16 spacer in between.

When used together, Icon button filled have a 16 spacer in between

When used together, Icon button filled have a 16 spacer in between.

When used together, Icon button clear have a 8 spacer in between

When used together, Icon button clear have a 8 spacer in between.

Showing Icon button filled with pause icon in a gallery

Showing Icon button filled with pause icon in a gallery

Showing Icon button outlined in product gallery

Showing Icon button outlined in product gallery.

Showing Icon button clear in gallery on hover

Showing Icon button clear in gallery on hover

Use sparingly when icon very clearly communicates the action. Consider using a text link instead when possible.

Do not use custom colors for buttons. The colors of different button variations have been designed to be consistent and accessible.

Don't

Don’t

Avoid using outlined icon buttons alongside filled or ghost buttons as it doesn’t create enough hierarchy in actions.

Do

Do

Don't

Don’t

Do not use clear or outlined buttons on top of videos or images.

Do

Do

Don't

Don’t

Icons can be used in buttons when additional clarity is required and the icon is highly relevant to the action. Icons should not be used for decoration.

Do

Do

Don't

Don’t