> ## 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 compact caller-owned content with optional leading and trailing slots.

export const StoryEmbed = ({storyId, title, height = 120}) => <>
    <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" allow="clipboard-write" 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" allow="clipboard-write" 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/primitives/data-display/tag) for colored categories and [Status](/ui/primitives/data-display/status) for workflow states.

<StoryEmbed storyId="ui-data-display-chip--display" title="Chip example" height={90} />

## Usage

```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" imageProps={{ alt: '' }} />
    }
  >
    Jane
  </Chip>
);
```

Children accept text or nodes. `startElement` and `endElement` accept avatars, icons, or other content. `endElementDivider` adds a separator before the trailing content. The default chip is a `div`; its slots can contain a separate action while the chip itself remains presentational.

Chip never inserts a label. Supply a translated fallback from your application when needed. Omit children for content made entirely from slots. An interactive chip with only an icon needs a caller-supplied accessible name.

## Appearance

<StoryEmbed storyId="ui-data-display-chip--catalog" title="Chip variants and sizes" height={200} />

`size` accepts `sm` or `md`. `variant` accepts `ghost`, `soft`, `solid`, or `plain`; `ghost` is the default. Plain chips have no resting fill or leading padding. Clickable plain chips retain the ghost hover and pressed backgrounds, pointer cursor, and focus ring. Use `shape="round"` for a pill, `weight="medium"` for emphasis, and `color="secondary"` for secondary text.

## Buttons and links

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

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

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

Supplying `onClick` keeps the default `div`. Use `render` to compose an explicit native button, anchor, router link, or another appropriate owner. Native attributes, handlers, styles and the root ref reach that owner. A native button supplies keyboard activation and disabled behavior. Chip recognizes native disabled state and `aria-disabled` for appearance; `aria-disabled` alone does not prevent activation.

`clickable` controls hover and pointer appearance and defaults to whether `onClick` is supplied. Set it explicitly for a link without a click handler. Do not nest buttons or links inside a chip that is itself interactive.

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

export const DocumentationChip = () => (
  <Chip render={<a href="https://twenty.com/developers" />} clickable>
    Documentation
  </Chip>
);
```

URL text remains plain text. Intentional links belong in caller content or in the explicit root composition.

## Truncation and tooltips

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

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

`maxWidth` constrains the rendered chip width in pixels, including padding. The same limit applies to plain chips with asymmetric padding. Content truncates with an ellipsis by default; `truncate={false}` leaves it unconstrained by truncation. String children supply their own tooltip text. Set `tooltipContent` for custom text or node content, `tooltipDelay` for the opening delay, and `isTooltipMultiline` to preserve line breaks. `alwaysShowTooltip` also enables the tooltip when content fits. These options follow [OverflowingTextWithTooltip](/ui/primitives/typography/overflowing-text-with-tooltip). Keep essential information available without relying on hover.

## Migration

Replace `emptyLabel` with caller-provided fallback children, and replace `forceEmptyText` or `isLabelHidden` with omitted children. Keep translated product fallbacks in the application. Replace `tooltipLabel` with `tooltipContent`. Move `disabled` to the explicit interactive owner and remove `nativeButton`. Add a native button or link through `render` wherever the chip previously relied on `onClick` to choose its element.

Replace leading-padding overrides with `variant="plain"`. Keep `clickable` enabled for native links and buttons that need hover and pressed feedback.

## 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 content tooltip even when the content is not truncated.
</ParamField>

<ParamField body="children" type="ReactNode">
  Caller-owned content. Missing or empty children add no fallback label.
</ParamField>

<ParamField body="clickable" type="boolean" default="isDefined(onClick)">
  Enables hover and pointer styling. Defaults to whether `onClick` is supplied; does not change the default div or add keyboard behavior.
</ParamField>

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

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

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

<ParamField body="isTooltipMultiline" type="boolean">
  Preserves line breaks in the tooltip text.
</ParamField>

<ParamField body="maxWidth" type="number">
  Maximum rendered chip width in pixels, including its leading and trailing padding.
</ParamField>

<ParamField body="render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>">
  Replaces the default div. Compose a native button or link explicitly; that owner supplies disabled and native interaction behavior.
</ParamField>

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

<ParamField body="size" type="&#x22;md&#x22; | &#x22;sm&#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="tooltipContent" type="string">
  Tooltip text. Defaults to string children. Supply text explicitly for node content.
</ParamField>

<ParamField body="tooltipDelay" type="number">
  Delay in milliseconds before the tooltip opens.
</ParamField>

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

<ParamField body="truncate" type="boolean" default="true">
  Truncates overflowing content with an ellipsis. Defaults to true.
</ParamField>

<ParamField body="variant" type="&#x22;ghost&#x22; | &#x22;plain&#x22; | &#x22;soft&#x22; | &#x22;solid&#x22;" default="ghost">
  Background treatment. Plain has no resting fill or leading padding, with ghost hover and pressed feedback when clickable.
</ParamField>

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.