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

<Badge variant="soft">Active</Badge>

Import options

Root package

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

Per-component subpath

ts
import { Badge } from '@dryui/ui/badge'

Customize

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

Variants

Solid Outline Soft
svelte
<Badge variant="solid">Solid</Badge>
<Badge variant="outline">Outline</Badge>
<Badge variant="soft">Soft</Badge>

Colors

Gray Blue Red Green Yellow Purple Orange
svelte
<Badge color="gray">Gray</Badge>
<Badge color="blue">Blue</Badge>
<Badge color="red">Red</Badge>
<Badge color="green">Green</Badge>
<Badge color="yellow">Yellow</Badge>
<Badge color="purple">Purple</Badge>
<Badge color="orange">Orange</Badge>

Sizes

Small Medium
svelte
<Badge size="sm">Small</Badge>
<Badge size="md">Medium</Badge>

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
solidoutlinesoftdot
'soft'
color
BadgeColor
'gray'
size
smmd
'sm'
children
Snippet
pulse
boolean
icon
Snippet

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