@quadrokit/ui
v0.3.23
Published
Shared **React** UI for QuadroKit templates: Tailwind **preset**, global **CSS variables** (light/dark + theme presets), and a few **shadcn-style** primitives (Radix Slot, CVA, `cn()`).
Readme
@quadrokit/ui
Shared React UI for QuadroKit templates: Tailwind preset, global CSS variables (light/dark + theme presets), and a few shadcn-style primitives (Radix Slot, CVA, cn()).
Usage
Add the dependency and Tailwind 3.4 in your app.
In
tailwind.config.ts, use the preset:import preset from '@quadrokit/ui/tailwind-preset'; export default { presets: [preset], content: [/* your files */, '../../node_modules/@quadrokit/ui/dist/**/*.{mjs,js,ts,tsx}'] };Import styles once (e.g. in
main.tsx):import '@quadrokit/ui/styles.css';Wrap the tree with
ThemeProviderand useThemeToolbar,Button,Card, etc.
Themes
- Color mode:
light|dark|system(viaThemeProvider/useTheme()). - Presets:
ocean,forest,sunset,mono(data-quadro-themeon<html>).
Adding a preset: extend src/styles.css with new html[data-quadro-theme='…'] blocks and register the id in src/theme/themes.ts.
Peer dependencies
react and react-dom ^18 or ^19. @quadrokit/client ^0.3.0 is required for hooks that use the generated REST client (e.g. useQuadroPagedCollection). Use a normal semver range in package.json — do not use workspace:* here (that is for the monorepo only and breaks installs from the npm registry).
