logo-icon
STW UI

Chip

Chips are compact elements that represent an input, attribute, or action.

Usage

svelte
import { Chip } from 'stwui';
// OR
import Chip from 'stwui/chip'; // for tree shaking

With Type

No Type
info
success
warn
error

With Size

Castor Troy
Castor Troy
Castor Troy
Castor Troy
Castor Troy

With Close

Castor Troy
Castor Troy

Chip Props

type 'info' | 'warn' | 'success' | 'error' | 'default' default
type 'xs' | 'sm' | 'md' | 'lg' | 'xl' md

Chip Slots

avatar <Chip.Avatar slot="avatar" />
label <Chip.Label slot="label" />
close <Chip.Close slot="close" />
default

Chip.Avatar Props

src string
alt string user-avatar
placeholder boolean true

Chip.Avatar Slots

placeholder <Avatar.Placeholder slot="placeholder" />

Chip.Avatar.Placeholder Slots

icon

Chip.Label Slots

default

Chip Class Identifiers

stwui-chip-avatar
stwui-chip-avatar-wrapper
stwui-chip
stwui-chip-close
stwui-chip-label
stwui-chip-icon-wrapper
stwui-chip-placeholder