Skip to content

InfoChip

An InfoChip is a non-interactive item that provides information.

Guidelines

When to use info chips

Use the InfoChip component to label, categorize, or organize information using keywords. It can be also used to provide success, warning or error feedback to the user.

This type of chip is just informative so it cannot be clickable or removable.

Specifications

Specification of InfoChip.

Info chips may contain the following items:

  1. Icon (optional)
    You can include a starting icon to visually convey the label. For notice chips, this icon is optional, while for chips providing feedback (error, warning, and success chips), the icon is required to communicate the feedback status effectively.
  2. Label
    Descriptive text about the chip.

Component limitations

The InfoChip label should be kept concise. It's limited to one line of text, and if it exceeds this limit, it will be truncated with an ellipsis, with no text wrapping.

By default, the InfoChip's width dynamically adjusts based on the length of the text. However, for consistency when grouping similar chips, the width of these chips can also be set to a fixed value, if required.

Example of chips with short text and fixed width.Chips with long text whose length grows with the chip's text.

Types

Types of chip based on its feedback status: notice, success, warning and error.

InfoChip works as an informative element, with its default type being "notice." In addition to this, the chip can offer user feedback by including icons and colors associated with success, warning, or error statuses.

Notice chip

As the notice chip solely conveys information without offering user feedback, its icon serves to emphasize the chip's label in a decorative manner. Any icon can be used, or it can be omitted as needed.

Example of notice chips with and without start icons.

Success, warning, and error chips

Conversely, in chips that offer user feedback (success, warning, and error chips), both the icon and its associated feedback color are essential for conveying meaning and feedback effectively to users. Therefore, these icons cannot be replaced or removed.

Example of a success, warning, and error chip.

Refer to the InfoChip component in Codex Figma.

Interaction states

InfoChip is purely informative so it only uses the default state.

Best practices

Consider the following recommendations when using info chips.

Usage

Two accordions with an InfoChip adjacent to their labels.

Do:
  • Use InfoChip to provide additional information within other components like Accordion.

Standalone InfoChip within a Wikipedia article.

Don't:
  • Use InfoChip as a standalone chip on a page.

Notice chips

A group of three Notice InfoChips displaying icons, and another group of three notice InfoChips with text only.

Do:
  • Utilize the start icon in notice chips when needed to strengthen the text, or hide it if not required.
  • Replace the Notice icon with any other that complements the chip's meaning.

A group of three notice InfoChips displaying complex icons, and another group of three notice InfoChips displaying an icon just in the first chip.

Don't:
  • Use icons with complex meanings to prevent user confusion and frustration.
  • Use icons selectively within a group of chips.

Success, warning, and error chips

A group of success, warning, and error InfoChips displaying their respective status icons.

Do:
  • Use the designated feedback icons for success, warning, and wrror chips.
  • Customize the label if needed.

A group of success, warning, and error InfoChips without icons, and another group with custom icons.

Don't:
  • Remove the icon in success, warning, and error chips, as it is crucial for indicating their statuses.
  • Replace the icon in success, warning, and error chips, as it reinforces the meaning of their respective statuses.

Demos

Configurable

Info Chip
NameValue
Props
icon
status
Slots
default
View
Reading direction
Note: For icon properties, the relevant icon also needs to be imported from the @wikimedia/codex-icons package. See the usage documentation for more information.

Default, with icon

Custom icons can only be used with the notice status. If they are passed with a different status, they will be ignored.

Photos

Long Text

It is generally best practice to use short text with the InfoChip. Long text content will be truncated with an ellipsis and lines will not be wrapped.

This is really really really really really really really really really really really really really really really really really really really really really really really long text

Vue usage

Props

Prop nameDescriptionTypeValuesDefault
statusStatus type.StatusType'notice', 'warning', 'error', 'success''notice'
iconCustom icon to use for "notice" chips. Chips with other status types (warning, etc) do not allow custom icons and will ignore this option.Icon-null

Slots

NameDescriptionBindings
defaultChip content.

CSS-only version

Markup structure

Text only

A simple chip with text content and no icon is straightforward.

Info Chip

The chip will inherit the reading direction of its context.

Right-to-left Chip

Long text behaves the same as with the full chip: it will be truncated with an ellipsis and lines will not be wrapped.

This is really really really really really really really really really really really really really really really really really really really really really really really long text