Getting StartedInstallation

Installation

Requirements

  • Node.js 16+
  • For React integration: React 17+

Install

# Vanilla JS / any framework
npm install @trailguide/core
 
# React (includes @trailguide/core)
npm install @trailguide/runtime

Import styles

Trailguide ships a single stylesheet that must be imported once, typically at your app’s entry point:

import '@trailguide/core/dist/style.css'

In a Next.js app, add it to app/layout.tsx (App Router) or pages/_app.tsx (Pages Router):

app/layout.tsx
import '@trailguide/core/dist/style.css'
 
export default function RootLayout({ children }) {
  return (
    <html>
      <body>{children}</body>
    </html>
  )
}

Which package do I need?

PackageUse when
@trailguide/coreVanilla JS, Vue, Angular, Svelte, or any non-React framework
@trailguide/runtimeReact apps — includes the <Trailguide> component, useTrail, useTrailManager, and useRegisterTour

@trailguide/runtime depends on @trailguide/core, so you only need to install one.