Set up Roadie in a React app.
Install the core package and component library:
pnpm add @oztix/roadie-core @oztix/roadie-components
Add the others as you need them:
| Package | For |
|---|---|
@oztix/roadie-charts | Charts and dashboards |
@oztix/roadie-editor | The rich-text Editor |
@oztix/roadie-widgets | The cart drawer, in React or Vue |
@oztix/roadie-lint-plugin | Lint rules for oxlint or ESLint that catch Roadie mistakes, as a dev dependency |
Add these to your HTML <head> to reduce font loading latency:
<link rel="preconnect" href="https://assets.oztix.com.au" crossorigin /><link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
In your main CSS entry point (such as globals.css or index.css), import Roadie's CSS. This single import includes Tailwind CSS v4, all design tokens, theme variables, and base styles:
@import '@oztix/roadie-core/css';
Tailwind v4 ignores node_modules by default, so it won't see the class strings inside Roadie's dist. If you're using @oztix/roadie-components, add one import. It ships its own @source, so you never write a node_modules path:
@import '@oztix/roadie-core/css';@import '@oztix/roadie-components/css';
Using widgets, charts, or the editor too? Add @oztix/roadie-widgets/css, @oztix/roadie-charts/css, or @oztix/roadie-editor/css as well. Each package's CSS registers only its own classes, so include every package you use. The React widget skins render Roadie components, so they need the components CSS too; the Vue skins don't:
@import '@oztix/roadie-core/css';@import '@oztix/roadie-components/css';@import '@oztix/roadie-widgets/css';@import '@oztix/roadie-charts/css';@import '@oztix/roadie-editor/css';
Wrap your app once, at the root. RoadieProvider routes every href through your router, handles light and dark, shows the toasts any component adds, and groups tooltips so a neighbour opens straight away.
Render <Providers> around {children} in your root layout. The file is a client component because a Link component can't cross from the server, and your layout and pages stay server components. Each part takes its usual options, and false leaves that part out:
| Prop | Sets up | Leave it out |
|---|---|---|
link | The Link component internal hrefs render through | Omit it for plain anchors |
theme | ThemeProvider options, such as followSystem or accentColor | theme={false} |
toast | Toast.Provider options, plus the viewport's position and container | toast={false} |
tooltip | Tooltip.Provider options, such as delay | tooltip={false} |
direction | ltr or rtl for every component. Set dir on <html> to match | Omit it to inherit |
pendingIndicator | The pending indicator on a Navigator frame | pendingIndicator={false} |
Every part is still exported on its own, and the nearest provider wins. This is what RoadieProvider mounts:
Place them yourself when one root doesn't fit:
<ThemeProvider accentColor={…}>) or a panel with its own Toast.Provider and viewport.<RoadieProvider theme={false} toast={false}> or just the providers they use.Replace your root's RoadieLinkProvider, ThemeProvider, and Toast.Provider with one RoadieProvider, and move their props across: Link becomes link, the theme's props go in theme, and the toast provider's props and the viewport's position go in toast. Nothing else changes, and the individual providers keep working.
Keep an individual provider only for a deliberate scoped override. In development, Roadie warns when a RoadieProvider sits inside another one, or when a ThemeProvider or Toast.Provider it already mounts wraps it or sits straight inside it.
Import each component from its own subpath. Components use the intent and emphasis props for styling:
The intent prop sets a component's colour:
<Button intent='neutral'>Default action</Button><Button intent='accent'>Primary action</Button><Button intent='danger'>Delete</Button><p className='intent-success'>Operation complete</p>
The emphasis prop controls the visual weight:
<Button emphasis='strong'>Strong button</Button><Button emphasis='normal'>Normal button</Button><Button emphasis='subtle'>Subtle button</Button><p className='text-subtle'>Secondary text</p>
Use standard Tailwind CSS classes for layout, spacing, and custom styling:
All components accept a className prop for additional Tailwind classes:
Each package ships a roadie.manifest.json that coding agents read, and a Claude Code plugin teaches agents to build with Roadie. Building with AI covers both.