> ## Documentation Index
> Fetch the complete documentation index at: https://docs.twenty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chip

> Show a compact record label with optional leading and trailing content.

export const StoryEmbed = ({storyId, title, height = 240}) => <>
    <Tabs>
      <Tab title="Light">
        <iframe title={`${title} (light)`} src={`https://storybook.twenty.com/iframe.html?id=${storyId}&viewMode=story&globals=colorScheme:light`} width="100%" height={height} loading="lazy" style={{
  border: 0
}} />
      </Tab>
      <Tab title="Dark">
        <iframe title={`${title} (dark)`} src={`https://storybook.twenty.com/iframe.html?id=${storyId}&viewMode=story&globals=colorScheme:dark`} width="100%" height={height} loading="lazy" style={{
  border: 0
}} />
      </Tab>
    </Tabs>
    <a href={`https://storybook.twenty.com/?path=/story/${storyId}`}>
      Open in Storybook
    </a>
  </>;

Use `Chip` for compact references to people, records, or files. Use [Tag](/ui/components/data-display/tag) for colored categories and [Status](/ui/components/data-display/status) for workflow states.

<StoryEmbed storyId="ui-data-display-chip--with-left-avatar" title="Chip example" />

## Record label

```tsx theme={null}
import { Avatar, Chip } from 'twenty-ui/primitives/data-display';

export const AssigneeChip = () => (
  <Chip
    variant="soft"
    startElement={<Avatar name="Jane" size="sm" shape="circle" />}
  >
    Jane
  </Chip>
);
```

Use `startElement` and `endElement` for avatars, icons, or other content. `endElementDivider` adds a separator before the trailing content. The default chip is a `div`; its slots can contain an action when the chip itself is not interactive.

## Open a record

```tsx theme={null}
import { Avatar, Chip } from 'twenty-ui/primitives/data-display';

type AssigneeActionProps = { onOpenAssignee: () => void };

export const AssigneeAction = ({ onOpenAssignee }: AssigneeActionProps) => (
  <Chip
    onClick={onOpenAssignee}
    aria-label="Open Jane's record"
    startElement={<Avatar name="Jane" size="sm" shape="circle" />}
  >
    Jane
  </Chip>
);
```

`onClick` renders a button with keyboard activation. `clickable` controls hover and pointer styling only; setting it alone does not create a button or add an action. `disabled` prevents activation of the button. Do not nest buttons or links inside an interactive chip.

Use `render` to replace the root element. If an `onClick` chip renders a non-button element, set `nativeButton={false}`. When `isLabelHidden` hides the label, give an interactive chip an `aria-label`.

## Width and empty labels

```tsx theme={null}
import { Chip } from 'twenty-ui/primitives/data-display';

export const FileChip = () => (
  <Chip variant="soft" maxWidth={180}>
    Quarterly customer research.pdf
  </Chip>
);
```

`maxWidth` constrains the chip in pixels. String labels truncate and show their full text in a tooltip on hover. `tooltipLabel` changes the tooltip text; `alwaysShowTooltip` also enables it when the label fits. Keep essential information available without relying on hover.

Missing, empty-string, or `false` children show `emptyLabel`, which defaults to `Untitled`. `forceEmptyText` suppresses that placeholder. `isLabelHidden` hides both the content label and the placeholder while preserving the slots.

## Appearance

`size` accepts `sm` or `md`. `variant` accepts `ghost`, `soft`, or `solid`; `ghost` is the default. Use `shape="round"` for a pill, `weight="medium"` for emphasis, and `color="secondary"` for secondary text.

## Props

Types and defaults are generated from the public component types. Native attributes and event handlers are also accepted.

<ParamField body="alwaysShowTooltip" type="boolean" default="false">
  Shows the string-label tooltip even when the label is not truncated.
</ParamField>

<ParamField body="clickable" type="boolean" default="isDefined(onClick)">
  Enables hover and pointer styling. Defaults to whether `onClick` is supplied; does not add button semantics by itself.
</ParamField>

<ParamField body="color" type="&#x22;primary&#x22; | &#x22;secondary&#x22;" default="primary">
  Primary or secondary text color.
</ParamField>

<ParamField body="disabled" type="boolean" default="false">
  Applies disabled styling and disables activation when `onClick` is supplied.
</ParamField>

<ParamField body="emptyLabel" type="string" default="Untitled">
  Placeholder shown when children are missing, empty, or false, unless `forceEmptyText` is enabled.
</ParamField>

<ParamField body="endElement" type="ReactNode">
  Content after the label. Avoid interactive content when the chip itself is a button.
</ParamField>

<ParamField body="endElementDivider" type="boolean" default="false">
  Adds a divider before `endElement` when that slot has content.
</ParamField>

<ParamField body="forceEmptyText" type="boolean" default="false">
  Suppresses the empty label when children are missing, empty, or false.
</ParamField>

<ParamField body="isLabelHidden" type="boolean" default="false">
  Hides the label while keeping the start and end elements. Supply an accessible name for an interactive chip.
</ParamField>

<ParamField body="maxWidth" type="number">
  Maximum chip width in pixels, used to constrain and truncate the label.
</ParamField>

<ParamField body="nativeButton" type="boolean" default="true">
  Set to `false` when a clickable chip uses `render` with an element other than a native button.
</ParamField>

<ParamField body="render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>">
  Allows you to replace the component's HTML element
  with a different tag, or compose it with another component.

  Accepts a `ReactElement` or a function that returns the element to render.
</ParamField>

<ParamField body="shape" type="&#x22;square&#x22; | &#x22;round&#x22;" default="square">
  Square or round corners.
</ParamField>

<ParamField body="size" type="&#x22;sm&#x22; | &#x22;md&#x22;" default="sm">
  Visual size of the chip.
</ParamField>

<ParamField body="startElement" type="ReactNode">
  Content before the label, such as an avatar or icon.
</ParamField>

<ParamField body="tooltipLabel" type="string">
  Tooltip content for a string label. Defaults to the label text.
</ParamField>

<ParamField body="tooltipPlace" type="&#x22;top&#x22; | &#x22;left&#x22; | &#x22;right&#x22; | &#x22;bottom&#x22;">
  Position of the string-label tooltip.
</ParamField>

<ParamField body="variant" type="&#x22;solid&#x22; | &#x22;soft&#x22; | &#x22;ghost&#x22;" default="ghost">
  Background treatment of the chip.
</ParamField>

<ParamField body="weight" type="&#x22;regular&#x22; | &#x22;medium&#x22;" default="regular">
  Font weight of the label.
</ParamField>
