| title | Chip | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| description | A Chip is a compact UI element that provides brief, descriptive information about an element. It is terse, ideally one word. | |||||||||
| status | ready | |||||||||
| thumb | true | |||||||||
| image | assets/images/components/chip.png | |||||||||
| storybook | https://dialtone.dialpad.com/vue/?path=/story/components-chip--default | |||||||||
| figma_url | https://www.figma.com/design/W58r5BkO8qTw3vem9YieJd/DT9-Component-Library--Rebrand-2025-?node-id=9937-64802 | |||||||||
| keywords |
|
Add :interactive="false" to make it a read-only, non-interactive Chip. This changes it from a <button> to a non-interactive, read-only Chip with no events or hover/active state. Note that this does not effect the interactivity of its × remove button.
<dt-chip :interactive="false">Chip</dt-chip><dt-chip>Chip</dt-chip>Use the disabled prop to disable both the Chip and its close button. This sets aria-disabled="true" and tabindex="-1" on the interactive elements and applies disabled styles, preventing pointer and keyboard interaction.
<dt-chip disabled>Chip</dt-chip><dt-chip :show-close="false">Chip</dt-chip><dt-chip :show-close="false">
<template #icon>
<dt-icon
name="phone"
size="200"
/>
</template>
<template #default>
Chip
</template>
</dt-chip><dt-chip>
<template #icon>
<dt-icon
name="phone"
size="200"
/>
</template>
<template #default>
Chip
</template>
</dt-chip><dt-chip>
<template #avatar>
<dt-avatar
image-src="/assets/images/person.png"
image-alt="Jaqueline Nackos"
full-name="Jaqueline Nackos"
/>
</template>
<template #default>
Chip
</template>
</dt-chip>To truncate text, add .d-truncate to the content element, and set the width of the .d-chip element.
<dt-chip content-class="d-w-150">
<span class="d-chip__text d-truncate">Chip loooooong name</span>
</dt-chip><!-- @wrapper -->
<dt-stack direction="row" gap="100">
<dt-chip :interactive="false" :size="100">Chip</dt-chip>
<dt-chip :interactive="false" :size="200">Chip</dt-chip>
<dt-chip :interactive="false">Chip</dt-chip>
</dt-stack>