Vue integration
Roadie's core CSS layer — tokens, intents, emphasis, elevation, typography, and interaction utilities — works with any framework. This guide covers using Roadie in a Vue application where only the CSS foundation is needed.
The React component library (@oztix/roadie-components) is not compatible with Vue. Use the token and utility class system directly instead.
Installation
Install the core package only:
pnpm add @oztix/roadie-core
You also need Tailwind CSS v4 and PostCSS:
pnpm add tailwindcss @tailwindcss/postcss postcss
Setup
1. Configure PostCSS
Create or update postcss.config.js:
export default {plugins: {'@tailwindcss/postcss': {}}}
2. Import Roadie CSS
In your main CSS entry point (e.g. src/assets/main.css):
@import '@oztix/roadie-core/css';
This single import includes Tailwind CSS v4, all design tokens, the reset, and every utility class.
3. Add font preconnect hints
Add these to your index.html <head>:
<link rel="preconnect" href="https://assets.oztix.com.au" crossorigin /><link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
Usage
Layout
Use grid-first layout with Tailwind utility classes:
Buttons
Use the btn base class with a size (btn-sm, btn-md, btn-lg) plus intent, emphasis, and interaction utilities:
Available sizes: btn-xs (24px), btn-sm (32px), btn-md (40px), btn-lg (48px). Icon buttons use btn-icon-xs through btn-icon-lg.
Intent and emphasis
Set color context with intent-* classes. Children inherit the palette automatically via CSS cascade:
See the tokens overview for how intent and emphasis work together.
Typography
Use the display utility classes for headings and standard Tailwind for body text:
<h1 class="text-display-prose-1 text-strong">Page title</h1><h2 class="text-display-ui-3 text-strong">Section heading</h2><p class="text-subtle">Secondary body text.</p><p class="text-sm text-subtle">Small helper text.</p>
Semantic colors
Roadie replaces default Tailwind colors with semantic tokens:
<div class="bg-normal text-normal">Default surface</div><div class="bg-subtle text-subtle">Tinted surface</div><div class="bg-raised text-strong border-subtle border">Elevated card</div><div class="bg-sunken">Recessed area</div>
Elevation
Shadows are tinted by the current intent:
Form inputs
Style form inputs with the is-interactive-field utility for automatic state transitions (neutral at rest, accent on focus, danger when invalid):
For composite inputs (e.g. an input with an attached button), use is-interactive-field-group on the wrapper:
Interactive elements
Use is-interactive for buttons, cards, and clickable elements. It provides cursor, transitions, active scale, focus ring, and disabled state:
Shape
Follow the shape tier system for consistent border-radius:
| Tier | Class | Use for |
|---|---|---|
| Inline | rounded-sm | Marks, highlights |
| Small | rounded-md | Code, prose images |
| Field | rounded-lg | Inputs, textareas, selects |
| Container | rounded-xl | Cards, popovers |
| Large | rounded-2xl | Modals, dialogs |
| Full | rounded-full | Buttons, badges, pills |
Dark mode
Toggle dark mode by adding the dark class to the <html> element. All tokens adapt automatically — no dark: variants needed.
For SSR-safe dark mode without flash, use the theme script from @oztix/roadie-core/theme:
import { getThemeScript } from '@oztix/roadie-core/theme'
Inject the script output into your index.html <head> as a blocking <script> tag. It reads localStorage and applies the dark class before first paint.
Dynamic accent color
To change the accent hue at runtime, use the color scale generator:
import { generateRadixScale } from '@oztix/roadie-core/colors'const scale = generateRadixScale('#6366f1')// Apply scale CSS variables to :root or a container element
What's not available
The following require the React component library and are not available in Vue:
- Pre-built components (Button, Select, Accordion, etc.)
ThemeProviderReact context (use the theme script + manual dark class toggling instead)useTheme()hook (manage theme state in your Vue app directly)
Everything else — tokens, intents, emphasis, elevation, typography, interactions, motion, and all Tailwind utilities — works identically.
Next steps
- Browse the Foundations pages for detailed guidance on each system
- See the Token reference for all available CSS custom properties
- Read about motion tokens for animations and transitions
- Check the Getting started guide for React setup