Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { ChipGroup } from '@dryui/ui';
</script>

<ChipGroup.Root type="multiple" bind:value={selectedFilters}>
  <ChipGroup.Item value="direct">Direct</ChipGroup.Item>
  <ChipGroup.Item value="flexible">Flexible</ChipGroup.Item>
  <ChipGroup.Item value="wifi">Wi-fi</ChipGroup.Item>
</ChipGroup.Root>

Import options

Root package

ts
import { ChipGroup } from '@dryui/ui'

Per-component subpath

ts
import { ChipGroup } from '@dryui/ui/chip-group'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Single Select

svelte
<script lang="ts">
  let value = $state(['standard']);
</script>

<ChipGroup.Root type="single" bind:value>
  <ChipGroup.Item value="standard">Standard</ChipGroup.Item>
  <ChipGroup.Item value="express">Express</ChipGroup.Item>
  <ChipGroup.Item value="overnight">Overnight</ChipGroup.Item>
</ChipGroup.Root>

Multi Select

svelte
<script lang="ts">
  let value = $state(['vegetarian']);
</script>

<ChipGroup.Root type="multiple" bind:value>
  <ChipGroup.Item value="vegetarian">Vegetarian</ChipGroup.Item>
  <ChipGroup.Item value="vegan">Vegan</ChipGroup.Item>
  <ChipGroup.Item value="gluten-free">Gluten-free</ChipGroup.Item>
  <ChipGroup.Item value="dairy-free">Dairy-free</ChipGroup.Item>
</ChipGroup.Root>

Vertical Orientation

svelte
<ChipGroup.Root type="multiple" orientation="vertical" bind:value>
  <ChipGroup.Item value="svelte">Svelte</ChipGroup.Item>
  <ChipGroup.Item value="typescript">TypeScript</ChipGroup.Item>
  <ChipGroup.Item value="rust">Rust</ChipGroup.Item>
</ChipGroup.Root>

Structure

Compound components always start with ChipGroup.Root. Use this structure block to understand required wrappers before you wire state or styling.

ChipGroup.Root
  ChipGroup.Item
ChipGroup.Root ChipGroup.Item

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Compound component. Start with ChipGroup.Root, then add only the parts you need.

ChipGroup.Item

ChipGroup.Root

Prop Type Default Required Bindable
type
singlemultiple
'single'
value
string[]
[]
disabled
boolean
false
orientation
horizontalvertical
'horizontal'
size
smmd
'sm'
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

ChipGroup.Item

Prop Type Default Required Bindable
value
string
disabled
boolean
children
Snippet

Forwards <button> attributes via rest props. Common examples: type, disabled, name.