---
title: Chip
description: Use Chip to select compact options and filters.
version: 11.18.0
generatedAt: 2026-11-17T13:48:15.485Z
checksum: 6354d4f24197631b9bcf890b43b7203f777864e484c66ba77ae74ebb3cb72063
---

# Chip

## Import

```tsx
import { Chip } from '@dnb/eufemia'
```

## Description

Chip is a compact, selectable option for filters, categories, and short choices. The component name is singular because each instance represents one chip.

## Chips for filters and choices

Use Chip.Group to manage related choices, their label, and shared name. The group selects one option by default using `value`. Set `selectionMode="multiple"` and use `values` when several options can be selected. Set a shared `variant` on the group to choose the appearance independently of the selection mode. The `addable` variant changes its icon between add and remove as the selection changes. It keeps the chip visible so the user can select it again.

Use [Tag](/web/components/tag/) for compact labels or removable values, [Badge](/web/components/badge/) for counts and statuses, and [Button](/web/components/button/) for actions.

## Toggle buttons

Use Chip like a toggle button to select or deselect an option. Use Chip.Group for mutually exclusive choices, or set `selectionMode="multiple"` to allow several selections. Use Chip for new implementations instead of [ToggleButton](/web/components/toggle-button/), which is deprecated.

When moving from ToggleButton, keep `checked`, `value`, `values`, `variant`, `size`, and `layoutDirection`. Check these differences:

| Feature           | Chip                                                                                                                                                                                                                                                                         |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Labels            | Use `text` or `children` for the option name. Move an external ToggleButton label to Chip.Group. `labelSrOnly` on Chip hides the option name; on Chip.Group it hides the group label.                                                                                        |
| Selection mode    | Replace `multiselect` with `selectionMode="multiple"`. Single selection is the default (`selectionMode="single"`).                                                                                                                                                           |
| Initial selection | Set `value` on a single selection group, or `values` with `selectionMode="multiple"`. A nested Chip's `checked` does not initialize its group. Use `checked` for standalone chips.                                                                                           |
| Change events     | Chip returns `{ checked, value, event }`. Chip.Group also returns `values` containing all selected options, including in single selection mode. `value` identifies the changed option. The ref and `event.currentTarget` refer to the native input or addable toggle button. |
| Values            | Strings and numbers preserve their type in change events. Use matching types for group and option values, and keep values unique after conversion to strings. Map objects and arrays to stable identifiers. Native form submission uses strings.                             |
| Appearance        | Chip.Group controls single or multiple selection independently of `variant`. Use `icon` for decorative content before the name and `suffix` for per-option help outside the pill.                                                                                            |

## Accessibility

Give every chip a short name using `text` or `children`. `text` takes precedence over `children`. Prefer visible names. Use `labelSrOnly` with a recognizable icon when space is limited, and provide the hidden name in `tooltip` so it is available on hover and keyboard focus. Keep the content to text and decorative icons. Links, buttons, and other interactive elements must be outside the chip.

Chip uses native checkboxes and radio inputs. Addable chips use native toggle buttons with `aria-pressed`, except in single selection groups, which retain radio inputs. The name stays the same when selected; the add and remove icons are decorative. Assistive technology announces the selected or pressed state. Only selected, enabled chips participate in native form submission using their `name` and `value`.

Give Chip.Group a visible `label`. A single selection group uses native radio inputs. A multiple selection group uses native checkboxes, or toggle buttons for addable chips. Tab moves between checkboxes or toggle buttons and enters or leaves a radio group. Space or Enter selects an option; arrow keys move between radio options. Disabled options are skipped. Standalone chips use checkboxes, except for the `radio` and `addable` variants.

Use `status` for an error message that explains how to resolve the problem. `readOnly` preserves the selection while keeping the chip focusable. Read-only addable buttons expose `aria-disabled` to communicate that they cannot be changed. `disabled` removes the chip from keyboard navigation and form submission.

## Relevant links

- [Figma](https://www.figma.com/design/cdtwQD8IJ7pTeE45U148r1/?node-id=70338-7697)
- [Source code](https://github.com/dnbexperience/eufemia/tree/main/packages/dnb-eufemia/src/components/chip)
- [Docs code](https://github.com/dnbexperience/eufemia/tree/main/packages/dnb-design-system-portal/src/docs/web/components/chip)


## Related components

Chip is part of the [Inputs](/web/components/overview/#input) category. More components in this category:

- [Autocomplete](/web/components/autocomplete/) – to help people find and choose from matching suggestions as they type.
- [Checkbox](/web/components/checkbox/) – when people can turn one or more options on or off.
- [Date picker](/web/components/date-picker/) – when people need to choose one date or a date range.
- [Dropdown](/web/components/dropdown/) – when people need to choose one option from a list.
- [Filter](/web/components/filter/) – to help people narrow down a list or data set.
- [Input](/web/components/input/) – when people need to enter a short line of text.

[See all in Inputs](/web/components/overview/#input)


## Demos

### Multiple selection

Keep selected values in state when they are used to filter content. Every option remains available after selection.


```tsx
const Example = () => {
  const [values, setValues] = useState<ChipValue[]>(['savings']);
  return <Flex.Stack>
            <Chip.Group selectionMode="multiple" label="Account filters" name="filters" values={values} onChange={({
      values
    }) => setValues(values)}>
              {['savings', 'funds', 'loans'].map(value => <Chip key={value} value={value}>
                  {value === 'savings' ? 'Savings' : value === 'funds' ? 'Funds' : 'Loans'}
                </Chip>)}
            </Chip.Group>
            <P>Selected: {values.join(', ') || 'None'}</P>
          </Flex.Stack>;
};
render(<Example />);
```


### Single selection

Use Chip.Group to label and manage mutually exclusive choices. Set `variant="radio"` on the group to show radio indicators, or use the default appearance. Give each chip a unique value.


```tsx
render(<Chip.Group label="Account type" name="account" variant="radio" value="savings" onChange={({
  value
}) => console.log(value)}>
      <Chip value="savings">Savings</Chip>
      <Chip value="funds">Funds</Chip>
      <Chip value="loans" disabled>
        Loans
      </Chip>
      <Chip value="all">All accounts</Chip>
    </Chip.Group>)
```


### Variants and icons

Choose the visual cue that fits the task. In Chip.Group, the selection mode is controlled by `selectionMode`, independently of the appearance.


```tsx
render(<Flex.Container gap="x-small" role="group" aria-label="Chip variants">
      <Chip>Default</Chip>
      <Chip variant="addable">Add or remove</Chip>
      <Chip variant="checkbox">Checkbox</Chip>
      <Chip icon={savings_account}>Savings</Chip>
    </Flex.Container>)
```


### Flags and logos

Use `icon` for a CountryFlag or an Avatar with a logo. Keep the image decorative and give the chip a visible text label. The DNB logo in the Figma design is a circular avatar, shown here at 16 × 16 pixels.


```tsx
render(<Flex.Stack>
      {[false, true].map(checked => <Flex.Container key={String(checked)} gap="x-small">
          <Chip checked={checked} icon={<CountryFlag iso="US" size="small" />}>
            United States
          </Chip>
          <Chip variant="addable" checked={checked} icon={<Avatar src="/images/avatars/dnb.svg" alt="" hasLabel style={{
      width: '1rem',
      height: '1rem'
    }} />}>
            DNB
          </Chip>
          <Chip variant="checkbox" checked={checked} icon={<CountryFlag iso="NO" size="small" />}>
            Norway
          </Chip>
          <Chip variant="radio" checked={checked} icon={<Avatar src="/images/avatars/dnb.svg" alt="" hasLabel style={{
      width: '1rem',
      height: '1rem'
    }} />}>
            DNB
          </Chip>
        </Flex.Container>)}
    </Flex.Stack>)
```


### Group labels, layout, and status

Share selection state and a label with Chip.Group. Use `layoutDirection="column"` to stack the options, `suffix` for guidance, and `status` for a group message.


```tsx
render(<Flex.Stack>
      <Chip.Group label="View" value="overview">
        <Chip value="overview">Overview</Chip>
        <Chip value="details">Details</Chip>
      </Chip.Group>
      <Chip.Group selectionMode="multiple" variant="checkbox" label="Notifications" values={['email']} layoutDirection="column" suffix="Choose all that apply" status="Choose at least two channels">
        <Chip value="email">Email</Chip>
        <Chip value="sms">SMS</Chip>
      </Chip.Group>
      <Chip.Group label="Account (read only)" variant="radio" value="savings" readOnly>
        <Chip value="savings">Savings</Chip>
        <Chip value="funds">Funds</Chip>
      </Chip.Group>
    </Flex.Stack>)
```


### Sizes

Available sizes: `small`, `medium`, `default`, and `large`. Set `size` on Chip.Group for all options, or on an individual Chip to override it.


```tsx
render(<Flex.Stack>
      {(['small', 'medium', 'default', 'large'] as const).map(size => <Chip.Group key={size} label={size} size={size} selectionMode="multiple" values={['checkbox', 'radio']}>
          <Chip value="default">Default</Chip>
          <Chip value="addable" variant="addable">
            Addable
          </Chip>
          <Chip value="checkbox" variant="checkbox">
            Checkbox
          </Chip>
          <Chip value="radio" variant="radio">
            Radio
          </Chip>
        </Chip.Group>)}
      <Chip.Group label="Individual size override" size="large">
        <Chip value="inherited">Inherited</Chip>
        <Chip value="override" size="small">
          Small
        </Chip>
      </Chip.Group>
    </Flex.Stack>)
```


### Per-option help

Use `suffix` for guidance or a HelpButton beside an option. It stays outside the clickable pill, so opening help does not change the selection. Values can be strings or numbers; the numeric values in this example stay numeric in change events.


```tsx
render(<Flex.Stack>
      <Chip.Group label="Account" value={0} variant="radio">
        <Chip value={0} suffix={<HelpButton size="small" title="About savings">
              Savings accounts earn interest on your balance.
            </HelpButton>}>
          Savings
        </Chip>
        <Chip value={1} suffix={<HelpButton size="small" title="About funds">
              Funds let you invest for the long term.
            </HelpButton>}>
          Funds
        </Chip>
      </Chip.Group>
      <Chip.Group label="Filters" selectionMode="multiple" variant="checkbox">
        <Chip value="active" suffix={<HelpButton size="small" title="About active accounts">
              Show accounts that are currently in use.
            </HelpButton>}>
          Active accounts
        </Chip>
      </Chip.Group>
    </Flex.Stack>)
```


### Tooltips and hidden labels

Use `tooltip` for extra context. With `labelSrOnly`, the name is available to screen readers while the icon and selection indicator stay visible. Use a recognizable icon and repeat the hidden name in the tooltip so it is available on hover and keyboard focus.


```tsx
render(<Flex.Container gap="x-small" role="group" aria-label="Chip tooltips">
      <Chip tooltip="Show accounts that earn interest">Savings</Chip>
      <Chip icon={savings_account} labelSrOnly tooltip="Savings accounts">
        Savings accounts
      </Chip>
      <Chip variant="radio" icon={bell} labelSrOnly tooltip="Notifications">
        Notifications
      </Chip>
    </Flex.Container>)
```


### Error messages


```tsx
render(<Flex.Stack>
      <Chip.Group label="Accounts" variant="checkbox" selectionMode="multiple" values={['savings']} status="Select at least two accounts">
        <Chip value="savings">Savings</Chip>
        <Chip value="funds">Funds</Chip>
      </Chip.Group>
      <Chip.Group label="Period" variant="radio" value="month" status="Choose another period">
        <Chip value="month">Month</Chip>
        <Chip value="year">Year</Chip>
      </Chip.Group>
    </Flex.Stack>)
```


### Dark surface


```tsx
render(<Section surface="dark" innerSpace>
      <Flex.Container gap="x-small">
        <Chip>Default</Chip>
        <Chip variant="addable" checked>
          Selected
        </Chip>
        <Chip variant="checkbox" checked>
          Checkbox
        </Chip>
        <Chip variant="radio" checked>
          Radio
        </Chip>
        <Chip disabled>Disabled</Chip>
        <Chip variant="checkbox" disabled checked>
          Disabled selected
        </Chip>
      </Flex.Container>
    </Section>)
```


### Skeleton


```tsx
render(<Flex.Container gap="x-small">
      <Chip skeleton>Loading option</Chip>
      <Chip variant="checkbox" skeleton>
        Loading option
      </Chip>
      <Chip variant="radio" skeleton>
        Loading option
      </Chip>
    </Flex.Container>)
```


### Selected, disabled, and read-only states


```tsx
render(<Flex.Stack gap="small">
      {(['default', 'addable', 'radio', 'checkbox'] as const).map(variant => <Flex.Container key={variant} gap="x-small" role="group" aria-label={`${variant} states`}>
            <Chip variant={variant}>Chip</Chip>
            <Chip variant={variant} checked>
              Chip
            </Chip>
            <Chip variant={variant} disabled>
              Chip
            </Chip>
            <Chip variant={variant} disabled checked>
              Chip
            </Chip>
            <Chip variant={variant} readOnly>
              Read-only
            </Chip>
            <Chip variant={variant} readOnly checked>
              Read-only
            </Chip>
          </Flex.Container>)}
    </Flex.Stack>)
```


### Group appearances

Each appearance supports both single and multiple selection. Shared `disabled`, `readOnly`, and `skeleton` properties can also be set on the group.


```tsx
render(<Flex.Stack>
      {(['default', 'addable', 'checkbox', 'radio'] as const).map(variant => <Flex.Stack key={variant} gap="small">
            <Chip.Group variant={variant} value="selected" label={`${variant}: single`}>
              <Chip value="selected">Selected</Chip>
              <Chip value="available">Available</Chip>
              <Chip value="loading" skeleton>
                Loading
              </Chip>
            </Chip.Group>
            <Chip.Group variant={variant} selectionMode="multiple" values={['selected']} label={`${variant}: multiple`}>
              <Chip value="selected">Selected</Chip>
              <Chip value="available">Available</Chip>
              <Chip value="loading" skeleton>
                Loading
              </Chip>
            </Chip.Group>
          </Flex.Stack>)}
    </Flex.Stack>)
```


### Long labels

Keep labels short where possible. Longer text wraps within the available width.


```tsx
render(<Flex.Container gap="x-small">
      <Chip variant="checkbox">
        A longer option that wraps when space is limited
      </Chip>
      <Chip variant="radio">
        AnExtremelyLongUnbrokenLabelThatStillNeedsToFitOnASmallScreen
      </Chip>
    </Flex.Container>)
```

<!-- eufemia-properties-usage:start -->
Some properties provide flexibility for specific integrations. Follow the component's usage guidance. Customizations beyond the documented patterns need a use case approved by DNB UX. [Read about intended use and customization](/web/styling-and-themes/configuration/component-properties/#intended-use-and-customization).
<!-- eufemia-properties-usage:end -->

## Properties


```json
{
  "props": {
    "text": {
      "doc": "The visible name of the chip. Takes precedence over `children`. Use text and decorative content only.",
      "type": "React.ReactNode",
      "status": "optional"
    },
    "children": {
      "doc": "The visible name when `text` is not provided.",
      "type": "React.ReactNode",
      "status": "optional"
    },
    "variant": {
      "doc": "Choose the appearance. Chip.Group controls single or multiple selection independently of the appearance. Defaults to `default`. Addable chips use native toggle buttons with `aria-pressed`, except in single selection groups, which retain radio inputs. The icon switches between add and remove; the chip stays visible.",
      "type": [
        "\"default\"",
        "\"addable\"",
        "\"radio\"",
        "\"checkbox\""
      ],
      "status": "optional"
    },
    "size": {
      "doc": "The size of the chip. Inherits from Chip.Group. Defaults to `default`. Small, medium, default, and large have minimum heights of 1.5, 2, 2.5, and 3 rem respectively.",
      "type": [
        "\"default\"",
        "\"small\"",
        "\"medium\"",
        "\"large\""
      ],
      "status": "optional"
    },
    "suffix": {
      "doc": "Additional guidance or a help button outside the clickable pill. Associated with the control through `aria-describedby`.",
      "type": "React.ReactNode",
      "status": "optional"
    },
    "icon": {
      "doc": "Optional decorative icon, flag, or logo before the text. Accepts an [Icon](/web/components/icon/) name or React element.",
      "type": [
        "string",
        "React.ReactNode"
      ],
      "status": "optional"
    },
    "labelSrOnly": {
      "doc": "Hides the name visually while keeping it available to screen readers. Icons and selection indicators remain visible. Use a recognizable icon or indicator and provide a tooltip for the hidden name.",
      "type": "boolean",
      "status": "optional"
    },
    "tooltip": {
      "doc": "Additional information shown on hover or keyboard focus. Accepts text, React content, or a [Tooltip](/web/components/tooltip/) component for configuration. A tooltip that repeats the chip name is not announced twice.",
      "type": "React.ReactNode",
      "status": "optional"
    },
    "checked": {
      "doc": "Whether the chip is selected. Defaults to `false`. User interaction updates the selection, and a changed `checked` property synchronizes it. Inside Chip.Group, use the group `value` or `values` instead.",
      "type": "boolean",
      "status": "optional"
    },
    "value": {
      "doc": "The option identifier. Events preserve its string or number type; native form submission uses a string. Defaults to an empty string. Give every option in Chip.Group a unique value, including after conversion to a string.",
      "type": [
        "string",
        "number"
      ],
      "status": "optional"
    },
    "disabled": {
      "doc": "Prevents interaction, keyboard focus, and form submission.",
      "type": "boolean",
      "status": "optional"
    },
    "readOnly": {
      "doc": "Prevents selection changes while keeping the chip focusable and included in form submission when selected. Read-only addable buttons expose `aria-disabled`.",
      "type": "boolean",
      "status": "optional"
    },
    "status": {
      "doc": "Text with a status message. The style defaults to an error message. You can use `true` to only get the status color, without a message. A color change alone is not enough, so then show the message yourself, for example in a [FormStatus](/web/components/form-status/) or a [GlobalStatus](/web/components/global-status/).",
      "type": [
        "\"error\"",
        "\"information\"",
        "boolean"
      ],
      "status": "optional"
    },
    "statusState": {
      "doc": "Defines the state of the status. Can be `error`, `warning`, `information`, `success` or `marketing`. Defaults to `error`.",
      "type": [
        "\"error\"",
        "\"warning\"",
        "\"information\"",
        "\"success\"",
        "\"marketing\""
      ],
      "status": "optional"
    },
    "statusProps": {
      "doc": "Use an object to define additional FormStatus properties. See [FormStatus](/web/components/form-status/properties/).",
      "type": "FormStatusProps",
      "status": "optional"
    },
    "globalStatus": {
      "doc": "The [configuration](/web/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/web/components/global-status).",
      "type": "object",
      "status": "optional"
    },
    "skeleton": {
      "doc": "If set to `true`, an overlaying skeleton with animation will be shown.",
      "type": "boolean",
      "status": "optional"
    },
    "ref": {
      "doc": "The native input or, for addable chips outside single selection groups, the button.",
      "type": "React.Ref<HTMLInputElement | HTMLButtonElement>",
      "status": "optional"
    },
    "[Space](/web/layout-and-typography/layout/space/properties)": {
      "doc": "Spacing properties like `top` or `bottom` are supported.",
      "type": [
        "string",
        "object"
      ],
      "status": "optional"
    }
  },
  "usageGuidance": "Some properties provide flexibility for specific integrations. Follow the component's usage guidance. Customizations beyond the documented patterns need a use case approved by DNB UX. [Read about intended use and customization](/web/styling-and-themes/configuration/component-properties/#intended-use-and-customization)."
}
```


Native input attributes such as `name`, `required`, `aria-label`, and `aria-describedby` are supported.

## `Chip.Group` properties

Chip.Group selects one option by default (`selectionMode="single"`). Use `value` for single selection, or `selectionMode="multiple"` with `values` for multiple selection. Set a shared `variant` on the group, and give every nested Chip a unique value.


```json
{
  "props": {
    "label": {
      "doc": "Use either the `label` property or provide a custom one.",
      "type": "React.ReactNode",
      "status": "optional"
    },
    "value": {
      "doc": "The selected chip value with `selectionMode=\"single\"` (the default). Must match the value and type of a nested Chip. User interaction updates the selection, and a changed `value` property synchronizes it. Set it to `undefined` to clear the selection.",
      "type": [
        "string",
        "number"
      ],
      "status": "optional"
    },
    "values": {
      "doc": "The selected values with `selectionMode=\"multiple\"`. User interaction updates the selection, and a new array synchronizes it. Keep the array in state and update it in `onChange`, because an inline array replaces the selection on every render. Use an empty array to clear the selection.",
      "type": "Array<string | number>",
      "status": "optional"
    },
    "selectionMode": {
      "doc": "Select one option using `value`, or several options using `values`. Defaults to `single`.",
      "type": [
        "\"single\"",
        "\"multiple\""
      ],
      "status": "optional"
    },
    "variant": {
      "doc": "Shared appearance. Each Chip can override it. Defaults to `default`.",
      "type": [
        "\"default\"",
        "\"addable\"",
        "\"radio\"",
        "\"checkbox\""
      ],
      "status": "optional"
    },
    "name": {
      "doc": "The shared form field name. Set it when the group is part of a form, so the submitted field has a predictable name. A unique name is generated when omitted.",
      "type": "string",
      "status": "optional"
    },
    "size": {
      "doc": "Shared size. Each Chip can override it. Defaults to `default`.",
      "type": [
        "\"default\"",
        "\"small\"",
        "\"medium\"",
        "\"large\""
      ],
      "status": "optional"
    },
    "disabled": {
      "doc": "Disables the chips in the group. Each Chip can override it.",
      "type": "boolean",
      "status": "optional"
    },
    "readOnly": {
      "doc": "Preserves the selection while keeping the chips focusable and included in form submission. Each Chip can override it.",
      "type": "boolean",
      "status": "optional"
    },
    "skeleton": {
      "doc": "If set to `true`, an overlaying skeleton with animation will be shown.",
      "type": "boolean",
      "status": "optional"
    },
    "layoutDirection": {
      "doc": "The layout direction of the chips. Defaults to `row`.",
      "type": [
        "\"column\"",
        "\"row\""
      ],
      "status": "optional"
    },
    "labelDirection": {
      "doc": "To define the `label` layout direction on how the next element should be placed on. Can be either `vertical` or `horizontal`. Defaults to `vertical`.",
      "type": [
        "\"vertical\"",
        "\"horizontal\""
      ],
      "status": "optional"
    },
    "labelSrOnly": {
      "doc": "Use `true` to make the label only readable by screen readers.",
      "type": "boolean",
      "status": "optional"
    },
    "vertical": {
      "doc": "Places both the label and the chips vertically.",
      "type": "boolean",
      "status": "optional"
    },
    "status": {
      "doc": "Uses the `form-status` component to show failure messages.",
      "type": [
        "string",
        "boolean"
      ],
      "status": "optional"
    },
    "statusState": {
      "doc": "Defines the state of the status. Can be `error`, `warning`, `information`, `success` or `marketing`. Defaults to `error`.",
      "type": [
        "\"error\"",
        "\"warning\"",
        "\"information\"",
        "\"success\"",
        "\"marketing\""
      ],
      "status": "optional"
    },
    "statusProps": {
      "doc": "Use an object to define additional FormStatus properties.",
      "type": "Various",
      "status": "optional"
    },
    "globalStatus": {
      "doc": "The [configuration](/web/components/global-status/properties/#configuration-object) used for the target [GlobalStatus](/web/components/global-status).",
      "type": "Various",
      "status": "optional"
    },
    "[Space](/web/layout-and-typography/layout/space/properties)": {
      "doc": "Spacing properties like `top` or `bottom` are supported.",
      "type": [
        "string",
        "object"
      ],
      "status": "optional"
    }
  }
}
```

## Events


```json
{
  "props": {
    "onChange": {
      "doc": "Called once when the user changes the selection. Returns `{ checked, value, event }`. For single selection, use Chip.Group onChange to receive the selected value.",
      "type": "({ checked: boolean; value: string | number; event: React.SyntheticEvent<HTMLInputElement | HTMLButtonElement> }) => void",
      "status": "optional"
    }
  }
}
```


## `Chip.Group` events


```json
{
  "props": {
    "onChange": {
      "doc": "Called once when the user changes the selection. Returns `{ value, values, checked, event }`. `value` identifies the changed chip; `values` contains all selected values. In single selection mode, `checked` is always true.",
      "type": "({ value: string | number; values: Array<string | number>; checked: boolean; event: React.SyntheticEvent<HTMLInputElement | HTMLButtonElement> }) => void",
      "status": "optional"
    }
  }
}
```
