Skip to content
Skillpedia
Websites & UI (frontend)8.7k Β· #12339

react-vite-dashboard

What it does

This skill builds dashboard web apps from Stitch screens using React, Vite and data-loading tools. It is for frontend developers making data-heavy admin or analytics screens.

When to use it

  • βœ“When you want a data dashboard built from a Stitch design.
  • βœ“When your dashboard needs data loaded and refreshed from an API.
  • βœ“When you want colors and spacing to follow a DESIGN.md file.

Skill link

https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-build/skills/react-vite-dashboard/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-build/skills/react-vite-dashboard/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œBuild a React and Vite dashboard from my Stitch screen, loading the sales numbers from our API.”

5 new skills a week. 1 minute to read.

How it works

It downloads the Stitch screen, maps the design tokens to CSS variables, and splits the code into components, pages and data hooks.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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)
  • 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 <section> with tokenized border-radius and elevation fallbacks for forced-colors
Tables Semantic <table> or TanStack Table; never div-only grids for tabular data
Buttons <button type="button"> with visible focus ring (preserve browser default unless DESIGN.md defines focus tokens)
Forms <label htmlFor> + <input id>; associate errors with aria-describedby
Loading Skeleton components; aria-busy on containers during fetch
Wallet connect Isolate in WalletProvider; never embed private keys in generated code

DESIGN.md integration

/* src/index.css β€” example token bridge */
:root {
  --color-primary: /* from DESIGN.md colors.primary */;
  --font-body: /* typography.body-md.fontFamily */;
}

Run the design.md linter locally before shipping UI:

npx @google/design.md lint DESIGN.md

Web3 dashboard conventions

  • Read-only contract calls via useReadContract (viem/wagmi) or ethers Contract + TanStack Query queryFn.
  • Format token amounts with formatUnits; show network name and chain ID in settings footer.
  • Surface transaction errors in plain language; link to block explorer when txHash exists.
  • Gas-sensitive flows: batch reads, avoid redundant eth_call in render loops.

File structure

src/
β”œβ”€β”€ components/     # Presentational UI from Stitch
β”œβ”€β”€ pages/          # Route-level screens
β”œβ”€β”€ hooks/          # useQuery wrappers, wallet hooks
β”œβ”€β”€ lib/            # ABI helpers, formatters
└── styles/         # Token CSS variables

Quality checklist

  • WCAG 2.2 AA: contrast from DESIGN.md component pairs passes linter
  • Keyboard navigable: focus order matches visual order
  • Responsive: test at 375px and 1280px widths
  • No secrets in repo: RPC URLs from env (VITE_* prefix only for public endpoints)
  • TypeScript strict: no any on contract ABIs

Stitch docs note

When following links on stitch.withgoogle.com/docs, use the full https://stitch.withgoogle.com/docs/... URL if relative navigation redirects incorrectly.

FAQ

What is TanStack Query?

It is a library that loads, caches and refreshes data for React screens.

Do I need a DESIGN.md file?

The skill works best with one, since it uses the file to match colors, type and spacing.

Does it support blockchain data?

Yes, it mentions optional support for on-chain reads with ethers or viem.

Details

Original description by the author

Convert Stitch designs into production React + Vite dashboards with TanStack Query, accessible tokens from DESIGN.md, and Web3-ready patterns (ethers/viem).

repo: google-labs-code/stitch-skills

Popularity

GitHub stars
8.7k
Ranking position
#12339
License
Apache-2.0
Updated
8/17/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills