Skip to content

gabelul/stitch-kit / skills/stitch-react-components

stitch-react-components

Verified

Converts a Stitch screen, a local HTML file, or a URL into modular Vite + React components — TypeScript, theme-mapped Tailwind, dark mode via CSS variables, and clean component architecture. Use this for Vite/React apps without App Router. For Next.js 15 App Router, use stitch-nextjs-components instead. Only the Stitch route needs an API key.

resources/architecture-checklist.md

View on GitHub
# React (Vite) Components — Architecture Checklist

Run through this before marking the conversion complete.

## Structure
- [ ] Each component is in its own file under `src/components/`
- [ ] Custom hooks extracted to `src/hooks/`
- [ ] Static content (labels, mock data, lists) in `src/data/mockData.ts`
- [ ] No single monolithic file — if it's over 200 lines, split it

## Type safety
- [ ] Props interfaces use `Readonly<ComponentNameProps>`
- [ ] No `any` types — use `unknown` and narrow
- [ ] Template placeholder `StitchComponent` replaced with real component name

## Styling
- [ ] Stitch design tokens extracted and synced to `tailwind.config` (`theme.extend.colors`, `borderRadius`, `boxShadow`)
- [ ] Theme-mapped class names used (`bg-primary`, `text-foreground`) — no raw hex in className
- [ ] Dark mode (`dark:` variants) applied where applicable
- [ ] No leftover Stitch-only tokens (e.g. `background-light`) unless defined in project config

## Functionality
- [ ] `useTheme()` hook implemented and wired to `dark:` classes or CSS variable root
- [ ] All interactive elements have `onClick` / `onChange` handlers (or clear TODO comments)
- [ ] No `console.log` in production code

## Accessibility
- [ ] All interactive elements are keyboard accessible
- [ ] `<img>` elements have descriptive `alt` text
- [ ] ARIA attributes added where semantic HTML isn't enough

## References
- `references/tailwind-to-react.md` — token + class mapping guide
- `resources/component-template.tsx` — base component structure
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall