@playaos/ui-kit
v0.2.2
Published
PlayaOS branded components — fully themed, ships precompiled CSS
Maintainers
Readme
@playaos/ui-kit
Fully PlayaOS-branded React components — ships precompiled CSS for design tokens. Re-exported components from @playaos/ui-default still require Tailwind CSS.
Choosing the right package
| Package | Style | When to use |
|---------|-------|-------------|
| @playaos/ui | Unstyled | Bring your own design system |
| @playaos/ui-default | Vanilla Tailwind | Shadcn-style, easy to override |
| @playaos/ui-kit | PlayaOS branded | Drop-in PlayaOS look and feel |
Install
npm install @playaos/ui-kit @playaos/uiUsage
Import the stylesheet once at your app's entry point:
import "@playaos/ui-kit/style.css";Then use components:
import { PlanLimitAlert, DataTable, DirectoryProfileCard } from "@playaos/ui-kit";Design tokens
All brand values are CSS custom properties defined in style.css. Override any token in your own CSS:
:root {
--playaos-color-primary: #6366f1; /* swap orange for indigo */
}| Token | Default | Description |
|-------|---------|-------------|
| --playaos-color-primary | #f97316 | Brand orange |
| --playaos-color-secondary | #1e293b | Dark slate |
| --playaos-color-accent | #fed7aa | Soft orange tint |
| --playaos-color-border | #e2e8f0 | Neutral border |
| --playaos-color-muted | #f8fafc | Background muted |
| --playaos-radius-md | 0.5rem | Standard corner radius |
Waffles appearance pack
@playaos/ui-kit/appearance/waffles.css re-skins the kit with the Waffles Admin brand (PLA-1190). It is an opt-in token overlay — a DaisyUI waffles-light theme plus a waffles-dark companion and the matching --playaos-* overrides — not a fork. Import it into your Tailwind entry after the kit styles, then mark the root element:
/* globals.css */
@import "@playaos/ui-kit/appearance/waffles.css";<html data-theme="waffles-light" data-playaos-appearance="waffles">data-theme="waffles-light"/"waffles-dark"activates the DaisyUI theme and the kit tokens together.data-playaos-appearance="waffles"activates the light kit tokens on its own, for consumers that render the kit without DaisyUI themes.
The pack declares DaisyUI themes, so daisyui must be present in the consuming Tailwind build (it is a peer dependency of the kit). It is built for the Waffles app: do not import it into an app that already declares its own prefersdark: true DaisyUI theme, since DaisyUI auto-applies the last such theme and waffles-dark would override it under an OS dark-mode preference.
The reviewed snapshot of every token lives in src/appearance/waffles.test.ts.
Components
All components from @playaos/ui-default are re-exported. The following receive PlayaOS brand overrides:
| Component | Override |
|-----------|---------|
| PlanLimitAlert | Brand accent background |
| DirectoryProfileCard | Brand border, link, and badge colors |
| DataTable | Brand muted header and selected row |
All other components (AdminShellLayout, DataTableColumnHeader, DataTablePagination, DataTableViewOptions, DraggableRow) are re-exported as-is from @playaos/ui-default.
