Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): add tour #3135

Merged
merged 2 commits into from
Jan 11, 2025
Merged

feat(*): add tour #3135

merged 2 commits into from
Jan 11, 2025

Conversation

cschroeter
Copy link
Member

@cschroeter cschroeter commented Dec 12, 2024

import { Tour, useTour } from '@ark-ui/react/tour'
import { XIcon } from 'lucide-react'
import { useEffect } from 'react'
import { steps } from './steps'

export const DemoTour = () => {
  const tour = useTour({ steps })

  // Start the tour when the component mounts
  useEffect(() => {
    tour.start()
  }, [])

  return (
    <Tour.Root tour={tour}>
      <Tour.Backdrop />
      <Tour.Spotlight />
      <Tour.Positioner>
        <Tour.Content>
          <Tour.Arrow>
            <Tour.ArrowTip />
          </Tour.Arrow>
          <Tour.Title />
          <Tour.Description />
          <Tour.ProgressText />
          <Tour.CloseTrigger>
            <XIcon />
          </Tour.CloseTrigger>
          <Tour.Control>
            <Tour.Actions>
              {(actions) =>
                actions.map((action) => <Tour.ActionTrigger key={action.label} action={action} />)
              }
            </Tour.Actions>
          </Tour.Control>
        </Tour.Content>
      </Tour.Positioner>
    </Tour.Root>
  )
}

Copy link

vercel bot commented Dec 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ark-docs ✅ Ready (Inspect) Visit Preview Jan 11, 2025 9:22am

Copy link

pkg-pr-new bot commented Dec 12, 2024

Open in Stackblitz

npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/react@3135
npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/solid@3135
npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/svelte@3135
npm i https://pkg.pr.new/chakra-ui/ark/@ark-ui/vue@3135

commit: 1033e22

@cschroeter cschroeter marked this pull request as ready for review December 29, 2024 16:29
@cschroeter cschroeter merged commit f006de5 into main Jan 11, 2025
9 checks passed
@cschroeter cschroeter deleted the feat/tour branch January 11, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant