@servicestack/react
v2.0.17
Published
ServiceStack's React Component Library - A comprehensive collection of React components for building modern web applications.
Readme
@servicestack/react
ServiceStack's React Component Library - A comprehensive collection of React components for building modern web applications.
Features
- 🎨 Beautiful UI Components - Pre-styled components with Tailwind CSS
- 🔄 Framework Agnostic Routing - Works with React Router, Next.js, or plain HTML
- ⚡ React 19 Compatible - Full support for React 19 including SSR mode
- 📦 TypeScript Support - Fully typed components and APIs
- 🎯 AutoQuery Integration - Built-in components for ServiceStack AutoQuery APIs
- 🌙 Dark Mode Support - All components support dark mode out of the box
Quick Start
Installation
npm install @servicestack/reactConfiguration
The library supports multiple routing solutions. Choose the one that fits your project:
React Router (Vite, CRA, etc.)
import { setLinkComponent } from '@servicestack/react'
import { Link } from 'react-router-dom'
setLinkComponent(Link)Next.js
import { setLinkComponent } from '@servicestack/react'
import Link from 'next/link'
setLinkComponent(Link)No Router (Plain HTML)
No configuration needed! Components will automatically use standard anchor tags.
For detailed setup instructions, see SETUP.md.
Recommended IDE Setup
VSCode + ESLint + TypeScript
For the best development experience, we recommend:
- ES7+ React/Redux/React-Native snippets
- Built-in TypeScript support in VSCode
Customize configuration
See Vite Configuration Reference.
Project Setup
npm installCompile and Hot-Reload for Development
npm run devType-Check, Compile and Minify for Production
npm run buildExamples
Check out the examples directory for complete setup examples:
- React Router Setup - Vite + React + React Router
- Next.js App Router Setup - Next.js 13+ with App Router
- Next.js Pages Router Setup - Traditional Next.js routing
- No Router Setup - Plain React without routing
Documentation
For comprehensive documentation, visit docs.servicestack.net/react
License
This project is licensed under the terms specified in the LICENSE file.
