# React Vite Dashboard > Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready patterns (ethers/viem). Source: https://skillsagentes.com/skills/google-labs-code/stitch-skills/react-vite-dashboard Repository: https://github.com/google-labs-code/stitch-skills Author: google-labs-code License: Apache-2.0 Updated: el mes pasado Context cost: 39 tok installed, 926 tok once triggered, 1.1k tok with every bundled file Bundle: 2 files, 4 KB Permissions requested: stitch*:*, read, write, bash, web_fetch ## Install ```bash npx -y skills add google-labs-code/stitch-skills --skill react-vite-dashboard --agent claude-code ``` ## What it does - Convierte pantallas de Stitch en dashboards React 18 + Vite + TypeScript con TanStack Query - Mapea tokens de DESIGN.md (colores, tipografía, spacing) a variables CSS - Genera componentes en src/components, src/pages y src/hooks siguiendo la tabla HTML→React - Añade patrones Web3 opcionales con ethers v6 o viem para lecturas on-chain - Aplica checklist de accesibilidad WCAG 2.2 AA y buenas prácticas de seguridad de secretos ## Use it when - Necesitas construir un dashboard denso en datos a partir de un diseño de Stitch - El proyecto ya tiene un DESIGN.md para fidelidad de tokens - Quieres integrar lecturas de contratos on-chain en la interfaz ## What triggers it - "Convierte esta pantalla de Stitch en un dashboard React + Vite" - "Genera los componentes del dashboard usando los tokens de DESIGN.md" - "Añade lecturas de contrato con viem a este dashboard Web3" ## Before you install - Requiere Stitch MCP configurado, un DESIGN.md del proyecto y un scaffold Vite + React + TypeScript. - Needs on PATH: npx ## Files - README.md — 624 B - SKILL.md — 4 KB ## SKILL.md Reproduced verbatim from google-labs-code/stitch-skills under Apache-2.0. This section is the upstream document and is in English. # Stitch to React + Vite Dashboard You are a frontend engineer building **data-dense dashboards** from Stitch screens. Target stack: **React 18**, **Vite**, **TypeScript**, **TanStack Query**, **React Router**, and optional **ethers v6** or **viem** for on-chain reads. ## Prerequisites - Stitch MCP configured ([setup guide](https://stitch.withgoogle.com/docs/mcp/setup/)) - A project `DESIGN.md` (see the `design-md` skill) for token fidelity - Vite + React + TypeScript scaffold (`npm create vite@latest`) ## Workflow 1. **Discover MCP prefix** — run `list_tools`, note the Stitch prefix (e.g. `stitch:`). 2. **Fetch screen** — `[prefix]:get_screen` with project and screen IDs. 3. **Download assets** — persist HTML/screenshot under `.stitch/designs/{screen}.html` and `.png`. 4. **Read DESIGN.md** — map `colors.*`, `typography.*`, `spacing.*` to CSS variables in `src/index.css`. 5. **Generate components** — split into `src/components/`, `src/pages/`, `src/hooks/`. 6. **Wire data** — use TanStack Query for async fetches; keep presentational components pure. ## HTML → React mapping | Pattern | Implementation | |---------|----------------| | Layout grid / flex | Tailwind utilities or CSS modules aligned to DESIGN.md spacing tokens | | Cards / panels | `
` with tokenized border-radius and elevation fallbacks for forced-colors | | Tables | Semantic `` or TanStack Table; never div-only grids for tabular data | | Buttons | `