Enforce the skillshare design system across the two frontends. $ARGUMENTS is the file or area being worked on.
Companion skill: For UX design decisions beyond token/component usage — layout strategy, information hierarchy, interaction patterns, micro-copy, or when designing a new page from scratch — also invoke /ui-ux-pro-max for higher-level design guidance. This skill handles what components and tokens to use; /ui-ux-pro-max handles how to design the experience.
The project has two distinct design systems sharing semantic color names but with different visual treatments:
| Aspect |
UI Dashboard (ui/) |
Website (website/) |
| Stack |
React 19 + Vite + Tailwind CSS v4 |
Docusaurus 3 + custom CSS |
| Font body |
DM Sans |
IBM Plex Sans |
| Font heading |
DM Sans |
Inter |
| Font mono |
SFMono-Regular, Menlo |
JetBrains Mono |
| Border-radius |
Clean: 4px/8px/12px/pill |
Wobbly: 255px 15px 225px 15px / ... |
| Shadows |
Subtle blur: 0 1px 3px rgba(...) |
Hard offset: 4px 4px 0px 0px #2d2d2d |
| Background |
Flat #f7f6f3 |
Dot grid on #fdfbf7 |
| Philosophy |
skillshare-inspired minimal |
Hand-drawn sketchy organic |
UI Dashboard (ui/)
Reference implementation: ui/src/pages/LogPage.tsx
For the full human-readable style guide (design philosophy, visual rules, anti-patterns), see references/STYLE_GUIDE.md bundled with this skill.
Design Tokens
Defined in ui/src/index.css (@theme) and ui/src/design.ts:
// ui/src/design.ts
import { radius, shadows, palette } from '../design';
radius.sm // '4px' — badges, chips
radius.md // '8px' — cards, containers
radius.lg // '12px' — modals, panels
radius.btn // '9999px' — pill buttons (skillshare style)
radius.full // '9999px' — avatars
shadows.sm / .md / .lg / .hover / .active / .accent / .blue
palette.accent / .info / .success / .warning / .danger
Color Tokens (Tailwind classes)
| Role |
Class |
When |
| Primary text |
text-pencil |
Titles, names, values |
| Secondary |
text-pencil-light |
Descriptions, timestamps, labels |
| Tertiary |
text-muted-dark |
Hints, placeholders |
| Success |
text-success |
Passed, synced, clean |
| Warning |
text-warning |
Dirty, behind, partial |
| Danger |
text-danger |
Failed, blocked, critical |
| Info / Blue |
text-blue |
Links, info badges, repo URLs |
| Background |
bg-surface |
Cards, inputs |
| Page bg |
bg-paper |
Root background |
| Borders |
border-muted |
Default borders |
Rule: Max one accent color per visual region. Don't double up — if a row has a colored dot, skip the colored badge (or vice versa).
Typography
- Body: DM Sans (via
--font-hand)
font-mono: timestamps, file paths, durations, code, hashes
uppercase tracking-wider: command names, stat labels
- Size:
text-2xl > text-xl > text-base > text-sm > text-xs
Page Structure (mandatory order)
Every page follows this layout:
<div className="space-y-5 animate-fade-in">
<PageHeader icon={<Icon />} title="..." subtitle="..." actions={<>...</>} />
{/* Toolbar: tabs + filters */}
<div className="flex flex-wrap items-end gap-3">
<SegmentedControl ... />
<Select ... />
</div>
{/* Summary line or stat cards */}
<SummaryLine ... />
{/* Content: table, card list, or card grid */}
{empty ? <EmptyState ... /> : <ContentArea />}
{/* Dialogs (rendered at bottom, portal via DialogShell) */}
<ConfirmDialog ... />
</div>
Component Library
| Component |
File |
API |
Card |
Card.tsx |
variant="default|accent|outlined", hover, overflow, tilt?, padding="none|sm|md" — accent uses thicker border for emphasis (no stripe) |
Button |
Button.tsx |
variant="primary|secondary|danger|ghost|link", size="sm|md|lg", loading? |
Badge |
Badge.tsx |
variant="default|success|warning|danger|info|accent", size="sm|md", dot? |
PageHeader |
PageHeader.tsx |
icon, title, subtitle?, actions?, backTo? (styled back arrow) |
EmptyState |
EmptyState.tsx |
icon (LucideIcon), title, description?, action? |
ConfirmDialog |
ConfirmDialog.tsx |
open, onConfirm, onCancel, title, message, variant="default|danger" |
DialogShell |
DialogShell.tsx |
open, onClose, maxWidth, preventClose (backdrop blur + dialog-in animation) |
Input |
Input.tsx |
label? + standard input props (re-exports Checkbox, Select) |
Textarea |
Input.tsx |
label? + standard textarea props |
Select |
Select.tsx |
label?, value, onChange, options[], size="sm|md" |
Checkbox |
Checkbox.tsx |
label, checked, onChange, indeterminate?, disabled?, size="sm|md" |
Spinner |
Spinner.tsx |
size="sm|md|lg" — use instead of <RefreshCw className="animate-spin"> |
Tooltip |
Tooltip.tsx |
content: string, side="top|bottom" — portal-based, 200ms delay |
SegmentedControl |
SegmentedControl.tsx |
value, onChange, options[], connected?, colorFn? |
Pagination |
Pagination.tsx |
page, totalPages, onPageChange, rangeText?, pageSize? |
StatusBadge |
StatusBadge.tsx |
Status display |
Skeleton / PageSkeleton |
Skeleton.tsx |
Shimmer animation loading states |
Toast / useToast |
Toast.tsx |
toast(message, 'success'|'error') — exit animation, progress bar, hover pause |
FilterTagInput |
FilterTagInput.tsx |
Tag-based filter input |
IconButton |
IconButton.tsx |
Icon-only button with aria-label |
Stats Patterns (choose one)
| Pattern |
When |
| Inline summary text |
1-3 stats: "42 ops · 3 errors · last: 2m ago" |
| Stat card grid |
Dashboard overview KPIs only |
Status Patterns (choose one per element)
| Pattern |
Markup |
When |
| Colored dot |
w-2 h-2 rounded-full |
Table rows, list items, audit findings/rules |
| Badge |
<Badge variant="..."> |
Standalone labels |
List Patterns
| Pattern |
When |
| Table |
Uniform rows, sortable columns, many items |
| Card list (vertical) |
Mixed content per row, expandable |
| Card grid |
Visual overview, few fields per item |
Button Variants
| Variant |
When |
danger |
Permanent destructive: clear log, empty trash, delete forever |
secondary |
Reversible removal: uninstall, remove, restore |
ghost |
Cancel, clear filter, reset |
primary |
Positive action: save, sync, install, run |
Separator
Always: border-dashed border-pencil-light/30 (unified opacity, not /20 or /40)
Animations
| Context |
Value |
| Card rotation |
rotate(+-0.15deg) via :nth-child(odd/even) |
| Standalone accent |
Max rotate(+-0.3deg) |
| Hover |
transition-all duration-150 |
| Page entry |
animate-fade-in (0.2s ease-out) |
Keyboard Shortcuts
Registered in KeyboardShortcutsModal.tsx and useGlobalShortcuts.ts:
? — shortcuts modal
/ — focus search
g d/s/t/l — go to Dashboard/Skills/Targets/Log
r — refresh page
- Only fire when no
<input> / <textarea> focused
- Chord timeout: 500ms
- New shortcuts must be added to
KeyboardShortcutsModal
- Never override browser-native shortcuts (
Cmd+C, etc.)
Accessibility
| Concern |
Requirement |
| Focus ring |
focus:ring-2 focus:ring-blue/20 |
| Touch target |
Min 44x44px |
| Color contrast |
4.5:1 (WCAG AA) |
| Icon buttons |
aria-label required |
| Modals |
role="dialog" + aria-modal="true" + useFocusTrap |
| Select |
role="combobox" + aria-expanded + role="listbox/option" |
Card Overflow Gotcha
Card.tsx has overflow-hidden by default for border-radius clipping. Absolute-positioned children (dropdowns, tooltips) get clipped. Fix: pass overflow prop or add className="!overflow-visible".
Data Fetching Pattern
Pages use @tanstack/react-query:
const { data, isPending } = useQuery({
queryKey: queryKeys.someKey(...),
queryFn: () => api.someEndpoint(...),
staleTime: staleTimes.someCategory,
});
- Query keys:
ui/src/lib/queryKeys.ts
- API client:
ui/src/api/client.ts
- App context:
ui/src/context/AppContext.tsx provides { isProjectMode, projectRoot }
Website (website/)
Docusaurus with hand-drawn "sketchy organic" design in website/src/css/custom.css.
Key Differences from UI Dashboard
- Wobbly borders:
border-radius: var(--radius-wobbly) (not clean px values)
- Hard shadows:
4px 4px 0px 0px #2d2d2d (no blur)
- Dot grid bg:
radial-gradient(var(--color-muted) 1px, transparent 1px) on body
- Post-it yellow:
--color-postit: #fff9c4 for highlights
- Dashed borders everywhere: navbar, sidebar, tables, pagination, code blocks
- Button hover:
transform: translate(2px, 2px) + shadow shrinks (press-down feel)
- Links: wavy underline (
text-decoration-style: wavy)
- Dark mode: amber/gold primary (
#e8a84c) instead of blue
CSS Variables
See website/src/css/custom.css for full list. Key additions beyond shared palette:
--radius-wobbly[-sm|-md|-btn] — hand-drawn border-radius
--color-postit[-dark] — yellow highlight
--shadow-md: 4px 4px 0px 0px #2d2d2d — hard offset
--card-bg, --card-border, --install-bg — component-specific
Docusaurus Classes
.button--primary — green bg, pencil border, hard shadow
.button--secondary — dashed border, no fill
.markdown h2 — dashed bottom border
.admonition — wobbly border-radius, left stripe
.menu__link--active — post-it yellow background
.target-badge — wobbly border for target grid
- Code blocks get
box-shadow: 4px 4px 0px 0px #101827
Homepage Components (website/src/pages/index.tsx)
CARD_ROTATIONS array for random hand-drawn tilt
WavyDivider — SVG dashed wavy line between sections
InstallTabs — tabbed install commands with copy button
- Hero has hand-drawn SVG connector + underline
Anti-Patterns (Both Systems)
| Don't |
Do Instead |
| Emojis as status icons |
Colored dots, badges, or semantic icons |
| Stat cards for 1-3 values |
Inline summary text |
Left-border colored stripes (border-l-*) |
Colored dots or badges — never use left stripe for emphasis or status |
| Stripe + badge for same status |
Pick one per element |
Mixed separator opacity (/20, /40) |
Always border-pencil-light/30 |
window.confirm() |
<ConfirmDialog> component |
| Custom empty-state markup |
<EmptyState> component |
| Inline styles for design tokens |
Use Tailwind classes or design.ts exports |
overflow-visible on Card without overflow prop |
Pass overflow prop to Card |
Dropdowns inside flex-wrap title rows |
Put dropdowns on their own row |
Checklist Before Submitting
1---2name: skillshare-ui-website-style3description: Skillshare frontend design system for the React dashboard (ui/) and Docusaurus website (website/). Use this skill whenever you: build or modify a dashboard page or component in ui/src/, style or layout website pages or custom CSS in website/, create new React components for the dashboard, add pages to the dashboard, fix visual bugs in either frontend, or need to know which design tokens, components, or patterns to use. This skill covers color tokens, typography, component API, page structure, accessibility, keyboard shortcuts, animations, and anti-patterns for both frontends. Even if the user just says "fix the styling" or "add a card", use this skill to ensure consistency.4---56Enforce the skillshare design system across the two frontends. $ARGUMENTS is the file or area being worked on.78**Companion skill**: For UX design decisions beyond token/component usage — layout strategy, information hierarchy, interaction patterns, micro-copy, or when designing a new page from scratch — also invoke `/ui-ux-pro-max` for higher-level design guidance. This skill handles *what components and tokens to use*; `/ui-ux-pro-max` handles *how to design the experience*.910The project has **two distinct design systems** sharing semantic color names but with different visual treatments:1112| Aspect | UI Dashboard (`ui/`) | Website (`website/`) |13|--------|---------------------|----------------------|14| Stack | React 19 + Vite + Tailwind CSS v4 | Docusaurus 3 + custom CSS |15| Font body | DM Sans | IBM Plex Sans |16| Font heading | DM Sans | Inter |17| Font mono | SFMono-Regular, Menlo | JetBrains Mono |18| Border-radius | Clean: `4px`/`8px`/`12px`/pill | Wobbly: `255px 15px 225px 15px / ...` |19| Shadows | Subtle blur: `0 1px 3px rgba(...)` | Hard offset: `4px 4px 0px 0px #2d2d2d` |20| Background | Flat `#f7f6f3` | Dot grid on `#fdfbf7` |21| Philosophy | skillshare-inspired minimal | Hand-drawn sketchy organic |2223---2425## UI Dashboard (`ui/`)2627Reference implementation: `ui/src/pages/LogPage.tsx`2829> For the full human-readable style guide (design philosophy, visual rules, anti-patterns), see `references/STYLE_GUIDE.md` bundled with this skill.3031### Design Tokens3233Defined in `ui/src/index.css` (@theme) and `ui/src/design.ts`:3435```ts36// ui/src/design.ts37import { radius, shadows, palette } from '../design';3839radius.sm // '4px' — badges, chips40radius.md // '8px' — cards, containers41radius.lg // '12px' — modals, panels42radius.btn // '9999px' — pill buttons (skillshare style)43radius.full // '9999px' — avatars4445shadows.sm / .md / .lg / .hover / .active / .accent / .blue46palette.accent / .info / .success / .warning / .danger47```4849### Color Tokens (Tailwind classes)5051| Role | Class | When |52|------|-------|------|53| Primary text | `text-pencil` | Titles, names, values |54| Secondary | `text-pencil-light` | Descriptions, timestamps, labels |55| Tertiary | `text-muted-dark` | Hints, placeholders |56| Success | `text-success` | Passed, synced, clean |57| Warning | `text-warning` | Dirty, behind, partial |58| Danger | `text-danger` | Failed, blocked, critical |59| Info / Blue | `text-blue` | Links, info badges, repo URLs |60| Background | `bg-surface` | Cards, inputs |61| Page bg | `bg-paper` | Root background |62| Borders | `border-muted` | Default borders |6364**Rule**: Max one accent color per visual region. Don't double up — if a row has a colored dot, skip the colored badge (or vice versa).6566### Typography6768- Body: DM Sans (via `--font-hand`)69- `font-mono`: timestamps, file paths, durations, code, hashes70- `uppercase tracking-wider`: command names, stat labels71- Size: `text-2xl` > `text-xl` > `text-base` > `text-sm` > `text-xs`7273### Page Structure (mandatory order)7475Every page follows this layout:7677```tsx78<div className="space-y-5 animate-fade-in">79 <PageHeader icon={<Icon />} title="..." subtitle="..." actions={<>...</>} />8081 {/* Toolbar: tabs + filters */}82 <div className="flex flex-wrap items-end gap-3">83 <SegmentedControl ... />84 <Select ... />85 </div>8687 {/* Summary line or stat cards */}88 <SummaryLine ... />8990 {/* Content: table, card list, or card grid */}91 {empty ? <EmptyState ... /> : <ContentArea />}9293 {/* Dialogs (rendered at bottom, portal via DialogShell) */}94 <ConfirmDialog ... />95</div>96```9798### Component Library99100| Component | File | API |101|-----------|------|-----|102| `Card` | `Card.tsx` | `variant="default\|accent\|outlined"`, `hover`, `overflow`, `tilt?`, `padding="none\|sm\|md"` — accent uses thicker border for emphasis (no stripe) |103| `Button` | `Button.tsx` | `variant="primary\|secondary\|danger\|ghost\|link"`, `size="sm\|md\|lg"`, `loading?` |104| `Badge` | `Badge.tsx` | `variant="default\|success\|warning\|danger\|info\|accent"`, `size="sm\|md"`, `dot?` |105| `PageHeader` | `PageHeader.tsx` | `icon`, `title`, `subtitle?`, `actions?`, `backTo?` (styled back arrow) |106| `EmptyState` | `EmptyState.tsx` | `icon` (LucideIcon), `title`, `description?`, `action?` |107| `ConfirmDialog` | `ConfirmDialog.tsx` | `open`, `onConfirm`, `onCancel`, `title`, `message`, `variant="default\|danger"` |108| `DialogShell` | `DialogShell.tsx` | `open`, `onClose`, `maxWidth`, `preventClose` (backdrop blur + dialog-in animation) |109| `Input` | `Input.tsx` | `label?` + standard input props (re-exports Checkbox, Select) |110| `Textarea` | `Input.tsx` | `label?` + standard textarea props |111| `Select` | `Select.tsx` | `label?`, `value`, `onChange`, `options[]`, `size="sm\|md"` |112| `Checkbox` | `Checkbox.tsx` | `label`, `checked`, `onChange`, `indeterminate?`, `disabled?`, `size="sm\|md"` |113| `Spinner` | `Spinner.tsx` | `size="sm\|md\|lg"` — use instead of `<RefreshCw className="animate-spin">` |114| `Tooltip` | `Tooltip.tsx` | `content: string`, `side="top\|bottom"` — portal-based, 200ms delay |115| `SegmentedControl` | `SegmentedControl.tsx` | `value`, `onChange`, `options[]`, `connected?`, `colorFn?` |116| `Pagination` | `Pagination.tsx` | `page`, `totalPages`, `onPageChange`, `rangeText?`, `pageSize?` |117| `StatusBadge` | `StatusBadge.tsx` | Status display |118| `Skeleton` / `PageSkeleton` | `Skeleton.tsx` | Shimmer animation loading states |119| `Toast` / `useToast` | `Toast.tsx` | `toast(message, 'success'\|'error')` — exit animation, progress bar, hover pause |120| `FilterTagInput` | `FilterTagInput.tsx` | Tag-based filter input |121| `IconButton` | `IconButton.tsx` | Icon-only button with `aria-label` |122123### Stats Patterns (choose one)124125| Pattern | When |126|---------|------|127| **Inline summary text** | 1-3 stats: `"42 ops · 3 errors · last: 2m ago"` |128| **Stat card grid** | Dashboard overview KPIs only |129130### Status Patterns (choose one per element)131132| Pattern | Markup | When |133|---------|--------|------|134| Colored dot | `w-2 h-2 rounded-full` | Table rows, list items, audit findings/rules |135| Badge | `<Badge variant="...">` | Standalone labels |136137### List Patterns138139| Pattern | When |140|---------|------|141| Table | Uniform rows, sortable columns, many items |142| Card list (vertical) | Mixed content per row, expandable |143| Card grid | Visual overview, few fields per item |144145### Button Variants146147| Variant | When |148|---------|------|149| `danger` | Permanent destructive: clear log, empty trash, delete forever |150| `secondary` | Reversible removal: uninstall, remove, restore |151| `ghost` | Cancel, clear filter, reset |152| `primary` | Positive action: save, sync, install, run |153154### Separator155156Always: `border-dashed border-pencil-light/30` (unified opacity, not `/20` or `/40`)157158### Animations159160| Context | Value |161|---------|-------|162| Card rotation | `rotate(+-0.15deg)` via `:nth-child(odd/even)` |163| Standalone accent | Max `rotate(+-0.3deg)` |164| Hover | `transition-all duration-150` |165| Page entry | `animate-fade-in` (0.2s ease-out) |166167### Keyboard Shortcuts168169Registered in `KeyboardShortcutsModal.tsx` and `useGlobalShortcuts.ts`:170- `?` — shortcuts modal171- `/` — focus search172- `g d/s/t/l` — go to Dashboard/Skills/Targets/Log173- `r` — refresh page174- Only fire when no `<input>` / `<textarea>` focused175- Chord timeout: 500ms176- New shortcuts must be added to `KeyboardShortcutsModal`177- Never override browser-native shortcuts (`Cmd+C`, etc.)178179### Accessibility180181| Concern | Requirement |182|---------|-------------|183| Focus ring | `focus:ring-2 focus:ring-blue/20` |184| Touch target | Min 44x44px |185| Color contrast | 4.5:1 (WCAG AA) |186| Icon buttons | `aria-label` required |187| Modals | `role="dialog"` + `aria-modal="true"` + `useFocusTrap` |188| Select | `role="combobox"` + `aria-expanded` + `role="listbox/option"` |189190### Card Overflow Gotcha191192`Card.tsx` has `overflow-hidden` by default for border-radius clipping. Absolute-positioned children (dropdowns, tooltips) get clipped. Fix: pass `overflow` prop or add `className="!overflow-visible"`.193194### Data Fetching Pattern195196Pages use `@tanstack/react-query`:197```tsx198const { data, isPending } = useQuery({199 queryKey: queryKeys.someKey(...),200 queryFn: () => api.someEndpoint(...),201 staleTime: staleTimes.someCategory,202});203```204- Query keys: `ui/src/lib/queryKeys.ts`205- API client: `ui/src/api/client.ts`206- App context: `ui/src/context/AppContext.tsx` provides `{ isProjectMode, projectRoot }`207208---209210## Website (`website/`)211212Docusaurus with hand-drawn "sketchy organic" design in `website/src/css/custom.css`.213214### Key Differences from UI Dashboard215216- **Wobbly borders**: `border-radius: var(--radius-wobbly)` (not clean px values)217- **Hard shadows**: `4px 4px 0px 0px #2d2d2d` (no blur)218- **Dot grid bg**: `radial-gradient(var(--color-muted) 1px, transparent 1px)` on body219- **Post-it yellow**: `--color-postit: #fff9c4` for highlights220- **Dashed borders everywhere**: navbar, sidebar, tables, pagination, code blocks221- **Button hover**: `transform: translate(2px, 2px)` + shadow shrinks (press-down feel)222- **Links**: wavy underline (`text-decoration-style: wavy`)223- **Dark mode**: amber/gold primary (`#e8a84c`) instead of blue224225### CSS Variables226227See `website/src/css/custom.css` for full list. Key additions beyond shared palette:228- `--radius-wobbly[-sm|-md|-btn]` — hand-drawn border-radius229- `--color-postit[-dark]` — yellow highlight230- `--shadow-md: 4px 4px 0px 0px #2d2d2d` — hard offset231- `--card-bg`, `--card-border`, `--install-bg` — component-specific232233### Docusaurus Classes234235- `.button--primary` — green bg, pencil border, hard shadow236- `.button--secondary` — dashed border, no fill237- `.markdown h2` — dashed bottom border238- `.admonition` — wobbly border-radius, left stripe239- `.menu__link--active` — post-it yellow background240- `.target-badge` — wobbly border for target grid241- Code blocks get `box-shadow: 4px 4px 0px 0px #101827`242243### Homepage Components (`website/src/pages/index.tsx`)244245- `CARD_ROTATIONS` array for random hand-drawn tilt246- `WavyDivider` — SVG dashed wavy line between sections247- `InstallTabs` — tabbed install commands with copy button248- Hero has hand-drawn SVG connector + underline249250---251252## Anti-Patterns (Both Systems)253254| Don't | Do Instead |255|-------|------------|256| Emojis as status icons | Colored dots, badges, or semantic icons |257| Stat cards for 1-3 values | Inline summary text |258| Left-border colored stripes (`border-l-*`) | Colored dots or badges — never use left stripe for emphasis or status |259| Stripe + badge for same status | Pick one per element |260| Mixed separator opacity (`/20`, `/40`) | Always `border-pencil-light/30` |261| `window.confirm()` | `<ConfirmDialog>` component |262| Custom empty-state markup | `<EmptyState>` component |263| Inline styles for design tokens | Use Tailwind classes or `design.ts` exports |264| `overflow-visible` on Card without `overflow` prop | Pass `overflow` prop to Card |265| Dropdowns inside `flex-wrap` title rows | Put dropdowns on their own row |266267## Checklist Before Submitting268269- [ ] Uses existing components (Card, Badge, Button, etc.) — no custom markup for solved patterns270- [ ] Page follows PageHeader → Toolbar → Summary → Content structure271- [ ] Color tokens from Tailwind (`text-pencil`, not hardcoded `#141312`)272- [ ] Separator is `border-dashed border-pencil-light/30`273- [ ] Empty states use `<EmptyState>`274- [ ] Destructive actions use `<ConfirmDialog>`275- [ ] All icon buttons have `aria-label`276- [ ] New shortcuts registered in `KeyboardShortcutsModal`277- [ ] `animate-fade-in` on root container278- [ ] Dark mode works (check both themes)