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 { Tag } from '@dryui/ui';
</script>

<Tag dismissible ondismiss={handleDismiss}>Svelte</Tag>

Import options

Root package

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

Per-component subpath

ts
import { Tag } from '@dryui/ui/tag'

Customize

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

Basic Tags

Svelte TypeScript CSS
svelte
<Tag>Svelte</Tag>
<Tag variant="outline" color="blue">TypeScript</Tag>
<Tag variant="soft" color="green">CSS</Tag>

Removable Tags

Svelte TypeScript CSS
svelte
<script lang="ts">
  let tags = $state(['Svelte', 'TypeScript', 'CSS']);
  function removeTag(label: string) {
    tags = tags.filter(t => t !== label);
  }
</script>

{#each tags as tag (tag)}
  <Tag dismissible onDismiss={() => removeTag(tag)}>{tag}</Tag>
{/each}

Compose

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

Prop Type Default Required Bindable
variant
solidoutlinesoft
'soft'
color
TagColor
'gray'
size
smmd
'sm'
dismissible
boolean
onDismiss
() => void
children
Snippet

Forwards <span> attributes via rest props. Common examples: id, style, aria-label.