From 65b4d402c0c4d8f85ea30b7c6cb5053bab72e50b Mon Sep 17 00:00:00 2001 From: Xavier Saliniere Date: Tue, 28 Apr 2026 22:15:53 -0400 Subject: [PATCH 1/2] docs: reorganize LSD skill documentation structure --- skills/nipsys-lsd/SKILL.md | 336 ++-- .../examples/complex-application.md | 1612 +++++++++++++++++ skills/nipsys-lsd/references/architecture.md | 772 +------- skills/nipsys-lsd/references/colors.md | 329 +--- .../references/component-catalog.md | 69 + .../nipsys-lsd/references/component-list.md | 98 - .../references/component-patterns.md | 371 ++++ skills/nipsys-lsd/references/composition.md | 636 ++----- skills/nipsys-lsd/references/cva-patterns.md | 1279 ++----------- skills/nipsys-lsd/references/icons.md | 336 +--- skills/nipsys-lsd/references/spacing.md | 219 +-- .../nipsys-lsd/references/theme-variables.md | 118 ++ skills/nipsys-lsd/references/typography.md | 251 --- 13 files changed, 2866 insertions(+), 3560 deletions(-) create mode 100644 skills/nipsys-lsd/examples/complex-application.md create mode 100644 skills/nipsys-lsd/references/component-catalog.md delete mode 100644 skills/nipsys-lsd/references/component-list.md create mode 100644 skills/nipsys-lsd/references/component-patterns.md create mode 100644 skills/nipsys-lsd/references/theme-variables.md delete mode 100644 skills/nipsys-lsd/references/typography.md diff --git a/skills/nipsys-lsd/SKILL.md b/skills/nipsys-lsd/SKILL.md index 035c38da..6c4f0115 100644 --- a/skills/nipsys-lsd/SKILL.md +++ b/skills/nipsys-lsd/SKILL.md @@ -1,240 +1,152 @@ --- name: nipsys-lsd -description: Use when implementing UI components with @nipsys/lsd in React 19.2.4+ projects. Covers 38+ components, styling conventions, spacing scale, design system integration, TypeScript types, CVA patterns, and common usage patterns. +description: Use with @nipsys/lsd in React 19+ projects for UI component implementation, theming, and design system integration. Triggers on: "lsd component", "lsd design system", "logos design system", "@nipsys/lsd", component library patterns with spacing tokens (--lsd-spacing-*). +metadata: + version: 1.0.0 + category: frontend + sources: + - https://github.com/nipsysdev/lsd + - https://lsd.nipsys.dev --- -# LSD React Component Library +# LSD Component Library (@nipsys/lsd) -**LSD** (@nipsys/lsd) is a comprehensive component library built on Radix UI primitives, providing 38+ accessible, composable UI components for React 19.2.4+ applications. It uses TypeScript, Tailwind CSS v4, and CVA (class-variance-authority) for variant management. +LSD is a monochromatic, content-first component library built on Radix UI primitives with 41 components. High contrast, fully accessible, keyboard-navigable. -The design system follows a monochromatic aesthetics approach with 5 accent themes (monochrome, teal, nord, terracotta, catppuccin). Components are fully accessible, keyboard-navigable, and include built-in light/dark mode support with theme persistence. - -## Project Context - -Before implementing, verify: -1. **Check package.json** for `@nipsys/lsd` dependency -2. **Verify Tailwind CSS v4** configuration in project -3. **Check tsconfig.json** for path mappings to resolve `@nipsys/lsd` -4. **Confirm React 19.2.4+** version compatibility +## Requirements +- **Node.js:** 24+ +- **React:** 19+ +- **Tailwind CSS:** v4 +## Quick Discovery ```bash -grep -E '@nipsys/lsd|react|tailwindcss' package.json -``` - -## When to Use This Skill - -Use this skill when: -• Building or editing UI components in React 19.2.4+ projects using @nipsys/lsd -• Implementing forms, navigation, overlays, or feedback components -• Need to follow LSD design system conventions (spacing, colors, typography) -• Working with component composition (Dialog, InputGroup, Tabs, etc.) -• Creating new components that need to match LSD patterns -• Debugging LSD component implementation issues -• Choosing the right component from 38+ options for a given UI need - -DO NOT use this skill for: -• General React development without LSD components -• Creating components that don't follow LSD patterns -• Monorepo-specific tasks (docs generator, E2E testing) +# Verify installation +npm list @nipsys/lsd -## Core Principles - -1. **Use existing components first** - Check if an LSD component fits the need before building custom solutions -2. **Compose, don't reinvent** - LSD components are designed to be combined and nested -3. **Use built-in variants before custom styles** - Leverage variant props instead of custom className overrides -4. **Use semantic colors only** - Stick to `text-primary` and `text-destructive` color tokens +# View component documentation +# https://lsd.nipsys.dev/components/[component-name] +``` ## Critical Rules -### Spacing -**Always use LSD spacing variables, NEVER standard Tailwind classes:** +### Spacing → [references/spacing.md](references/spacing.md) +Use LSD spacing variables ONLY: - ✅ `className="mt-(--lsd-spacing-base)"` - ❌ `className="mt-4"` -See [references/spacing.md](references/spacing.md) for the 7-value scale and usage examples. - -### Color Tokens -Use only approved LSD color tokens: -- ✅ `text-primary`, `text-destructive` -- ❌ `text-muted-foreground`, `bg-muted` - -See [references/colors.md](references/colors.md) for the complete color token system. - -### Typography -Use the Typography component with approved variants: -- `h1`-`h5` - Headings -- `subtitle1`-`subtitle2` - Subtitles -- `body1`-`body2` - Body text -- `label1`-`label2` - Labels - -See [references/typography.md](references/typography.md) for usage guidelines. - -### Icons -**Always use Phosphor icons from `@phosphor-icons/react`:** -- Use `weight="duotone"` for most icons -- Exceptions: `CheckIcon`, `PlusIcon` use default weight - -See [references/icons.md](references/icons.md) for common patterns and examples. - -### Component Composition -Use sub-components for composition: -- Dialog → DialogRoot, DialogTrigger, DialogContent, DialogTitle, DialogClose -- InputGroup → InputGroupRoot, InputGroupAddOn, InputGroupAddOnIcon - -See [references/composition.md](references/composition.md) for all composition patterns. - -### CVA Patterns -10 components use CVA for variants. Use the `variant` and `size` props: -- Button, TextField, Badge, Checkbox, Switch, etc. - -See [references/cva-patterns.md](references/cva-patterns.md) for variant details. - -## Component Selection Guide - -| Need | Use | Example | -|------|-----|---------| -| Buttons, actions | Button | `` | -| Primary/secondary actions | ButtonGroup | `` | -| Text input | Input | `` | -| Multi-line text | Textarea | `