Skip to content
Theme:

Ui3nChip ​

Chip component for displaying tags, labels, and compact information elements.

Props

NameTypeDefaultDescription
idstring | undefined —

Root element id

heightstring | number | undefined —

Chip height

maxWidthstring | number | undefined —

Chip maximum width

plainboolean | undefinedfalse

Chip plain style

roundboolean | undefinedtrue

Chip round shape

closeableboolean | undefinedfalse

Chip closeable

colorstring | undefined —

Chip color

textSizestring | number | undefined —

Text size

textColorstring | undefined —

Text color

disabledboolean | undefined —

Chip disabled state

Events

Event NameArguments / Value TypeDescription
clickvalue: MouseEvent —
close —

Slots

Slot NameScope Props (v-slot)Description
#left{ size: number; color: string; }

Left slot

#default —

Default slot

CSS Variables

Set any of these where you need it — on :root, on a container, or on the element itself through [data-ui3n] — and the component follows. Leave them alone and it uses the defaults below.

NameDefault
--ui3n-chip-bg-colorvar(--color-bg-control-secondary-default)
--ui3n-chip-font-colorvar(--color-text-control-primary-default)
--ui3n-chip-font-size10px
--ui3n-chip-height24px
--ui3n-chip-max-width200px
--ui3n-chip-padding0 calc(var(--_chip-height) / 3)

Usage Examples ​

Simple chip ​

Simple chip

Basic chip usage with default settings

Default chip
Another chip
Tag label

Chip sizes ​

Chip sizes

Different chip heights: 20px, 24px (default), 32px, 40px

Small (20px)
Default (24px)
Medium (32px)
Large (40px)

Chip with left slot ​

Chip with left slot

Chip with icon or avatar in the left slot

Vue.js
TypeScript
Vite

Closeable chips ​

Closeable chips

Chips with close button using the closeable prop

JavaScript
Python
Go
Rust

Color customization ​

Color customization

Custom background color, text color and text size

Primary
Secondary
Success
Error
Warning

Plain style ​

Plain style

Chip with border outline using the plain prop

Plain chip
Primary outline
Success outline
Closeable outline