AsterUIDocsv1.0.2

Docs / Component reference

TourCard & yield* runTour()

Walk through a short sequence of instructions. The calling generator can resume once the tour ends.

Tour example

Install

sh
npx @fierst/ui@1.0.2 add tour

Registry dependencies: theme, icon, button. Package dependencies: @lucide/icons.

Exports from ./ui/tour: TourStep, TourCard, runTour.

Download the registry source for tour 1.0.2.

API contracts

ts
export interface TourStep {
  id: string;
  title: string;
  description: string;
}

export function TourCard({
  step,
  index,
  total,
  onPrev,
  onNext,
  onClose,
  class: extraClass,
}: {
  step: TourStep;
  index: number;
  total: number;
  onPrev?: () => void;
  onNext?: () => void;
  onClose?: () => void;
  class?: string;
})

export function* runTour(steps: readonly TourStep[]): Generator<View, boolean, any>