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

<Tour.Root>
  <Tour.Tooltip>...</Tour.Tooltip>
</Tour.Root>

Import options

Root package

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

Per-component subpath

ts
import { Tour } from '@dryui/ui/tour'

Customize

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

Basic Tour

Step 1: Welcome section
Step 2: Features section
Step 3: Get started section
svelte
<script lang="ts">
  import { Tour, Button } from '@dryui/ui';
  import type { TourStep } from '@dryui/ui';

  let active = $state(false);

  const steps: TourStep[] = [
    { target: '#step-1', title: 'Welcome', content: 'Start here.', placement: 'bottom' },
    { target: '#step-2', title: 'Features', content: 'Explore features.', placement: 'bottom' },
    { target: '#step-3', title: 'Done', content: "You're all set!", placement: 'top' },
  ];
</script>

<Button onclick={() => active = true}>Start Tour</Button>

<Tour.Root {steps} bind:active onComplete={() => active = false} onSkip={() => active = false}>
  <div id="step-1">Step 1 target element</div>
  <div id="step-2">Step 2 target element</div>
  <div id="step-3">Step 3 target element</div>
  <Tour.Tooltip />
</Tour.Root>

Structure

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

Tour.Root
  Tour.Tooltip
Tour.Root Tour.Tooltip

Compose

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

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

Tour.Tooltip

Tour.Root

Prop Type Default Required Bindable
steps
TourStep[]
active
boolean
false
onComplete
() => void
onSkip
() => void
children
Snippet

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

Tour.Tooltip

Prop Type Default Required Bindable
children
Snippet<[TooltipSnippetParams]>

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