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

<Sparkline data={[5, 10, 3, 8, 12, 7]} width={120} height={30} />

Import options

Root package

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

Per-component subpath

ts
import { Sparkline } from '@dryui/ui/sparkline'

Customize

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

Default

svelte
<Sparkline data={[12, 18, 14, 22, 19, 27, 31, 28, 35, 40, 38, 45]} />

Filled

svelte
<Sparkline
  data={[3, 5, 8, 14, 19, 24, 27, 26, 21, 15, 9, 4]}
  filled
  color="var(--dry-orange-500)"
/>

Custom Size with Highlight

svelte
<Sparkline
  data={[142, 138, 145, 150, 148, 155, 162, 158, 164, 170, 168, 175]}
  width={200}
  height={48}
  strokeWidth={2}
  highlightLast
  color="var(--dry-green-500)"
/>

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
data
number[]
width
number
height
number
color
string
filled
boolean
strokeWidth
number
highlightLast
boolean

Also accepts standard HTML attributes (class, style, id, etc.)