Langsung ke konten
Skillpedia
Website & UI (frontend)8.7k Β· #12339

react-vite-dashboard

Fungsinya

Skill ini membangun aplikasi web dasbor dari layar Stitch memakai React, Vite, dan alat pemuatan data. Skill ini ditujukan untuk pengembang frontend yang membuat layar admin atau analitik yang berat data.

Kapan dipakai

  • βœ“Saat Anda ingin dasbor data dibangun dari desain Stitch.
  • βœ“Saat dasbor Anda perlu memuat dan menyegarkan data dari API.
  • βœ“Saat Anda ingin warna dan spasi mengikuti file DESIGN.md.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-build/skills/react-vite-dashboard/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBangun dasbor React dan Vite dari layar Stitch saya, dan muat angka penjualan dari API kami.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill mengunduh layar Stitch, memetakan token desain ke variabel CSS, lalu membagi kode menjadi komponen, halaman, dan hook data.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.

Pertanyaan umum

Apa itu TanStack Query?

Itu adalah pustaka yang memuat, menyimpan dalam cache, dan menyegarkan data untuk layar React.

Apakah saya perlu file DESIGN.md?

Skill bekerja paling baik dengan file itu, karena dipakai untuk mencocokkan warna, tipografi, dan spasi.

Apakah mendukung data blockchain?

Ya, skill menyebutkan dukungan opsional untuk pembacaan on-chain dengan ethers atau viem.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
8.7k
Peringkat
#12339
Lisensi
Apache-2.0
Diperbarui
17/8/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa