Installation
Get started with Stride Design System in your React application. Stride is distributed as an npm package and works with any React 18+ or React 19+ project.Prerequisites
Before installing Stride, ensure your project meets these requirements: Stride is compatible with:- Next.js 13+ (App Router and Pages Router)
- Vite
- Create React App
- Remix
- Any React-based framework
Package Installation
Install Stride using your preferred package manager:Stride has a peer dependency on React 18 or 19. If you don’t have React installed, add it with:
Import Styles
Stride requires importing the CSS file containing all design tokens and component styles. Add this import once at the root of your application.- Next.js App Router
- Next.js Pages Router
- Vite
- Create React App
Import styles in your root
app/layout.tsx:app/layout.tsx
Setup Steps
Follow these steps to complete your Stride installation:TypeScript Configuration
Stride includes full TypeScript definitions out of the box. No additional setup is required, but ensure yourtsconfig.json has these settings:
tsconfig.json
Verify Installation
Create a simple test component to verify everything works:src/App.tsx
What’s Included
When you installstride-ds, you get:
- 22+ React Components - Button, Card, Input, Select, Dialog, and more
- Design Tokens - Semantic CSS variables for colors, spacing, typography
- 5 Predefined Brands - Stride, Coral, Forest, Runswap, Acme
- TypeScript Definitions - Full type safety and autocomplete
- Dark Mode Support - Automatic theming for light and dark modes
- Accessibility - WCAG 2.1 AA compliant components
Bundle Size
Stride is optimized for tree-shaking. Import only what you need:- Full package: ~45KB gzipped (all components)
- Single component: ~3-5KB gzipped (e.g., Button only)
- Styles: ~12KB gzipped (includes all design tokens)
Actual bundle size will vary based on which components you import. Vite and Next.js automatically tree-shake unused code.
Troubleshooting
Styles not appearing
Styles not appearing
Ensure you’ve imported
'stride-ds/styles' at the root of your application. This import must come before any component imports.TypeScript errors with React 19
TypeScript errors with React 19
If you’re using React 19, ensure your
@types/react version matches:Module not found: 'stride-ds/styles'
Module not found: 'stride-ds/styles'
Some bundlers require explicit file extensions. Try:Or configure your bundler to resolve
.css extensions automatically.Components not working with Server Components
Components not working with Server Components
All Stride components use React hooks and require
"use client" directive in Next.js App Router:Next Steps
Quickstart Guide
Build your first component with Stride
Component Library
Explore all available components
Brand System
Learn about multi-brand theming
Design Tokens
Customize colors and spacing