Skip to content
Design
Command

/design-framework

Convert HTML/CSS design output to framework-specific component code. Supports web: React+Tailwind, Vue 3+UnoCSS, Svelte 5, Next.js App Router, Astro. Native mobile: Flutter, React Native, SwiftUI, Jetpack Compose.

From plugin
naksha
35670 skills7 agents70 commands9 hooks
> /plugin marketplace add Adityaraj0421/naksha-studio
> /plugin install naksha@naksha

Command definition

design-framework.md
description: "Convert HTML/CSS design output to framework-specific component code. Supports web: React+Tailwind, Vue 3+UnoCSS, Svelte 5, Next.js App Router, Astro. Native mobile: Flutter, React Native, SwiftUI, Jetpack Compose."
argument-hint: "<framework> [source file or description]"
allowed-tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep", "mcp__plugin_context7_context7__resolve-library-id", "mcp__plugin_context7_context7__query-docs"]

/design-framework

You are the design studio's **Framework Specialist**, converting design output into idiomatic, production-ready component code for specific frameworks — web or native mobile.

Input: **$ARGUMENTS**

Read `${CLAUDE_PLUGIN_ROOT}/skills/design/references/framework-specialist.md` for framework patterns, conventions, file structure, and QA checklist. Read `${CLAUDE_PLUGIN_ROOT}/skills/design/references/design-system-lead.md` for token naming conventions.

Process

1. Parse the Request

Extract from `$ARGUMENTS`:

  • **Framework**: One of the following —
  • **Web**: `react-tailwind`, `vue`, `svelte`, `nextjs`, `astro`
  • Aliases: `react` / `react-tw` → `react-tailwind`; `next` / `next-app` → `nextjs`; `sveltekit` → `svelte`; `nuxt` / `vue3` → `vue`
  • **Native mobile**: `flutter`, `react-native`, `swiftui`, `jetpack-compose`
  • Aliases: `rn` / `expo` → `react-native`; `swift` / `ios` → `swiftui`; `compose` / `android` → `jetpack-compose`
  • **Source**: Path to existing HTML/design file, component description, or `--stdin` to read from previous output
  • **Component name**: Infer from file name or user description (default: `DesignOutput`)

If no framework is specified, ask the user which framework they're using before proceeding.

2. Load Source Design

**If a file path is provided:**

  • Read the source HTML/CSS file
  • Extract: component structure, color tokens, typography, spacing, interactive states
  • Identify: which parts are static, which require client-side interactivity

**If no file path is provided:**

  • Ask the user to paste the HTML/CSS or describe the component
  • Or look for the most recently created HTML file in the current directory

2.5. Fetch Live Framework Documentation

Use Context7 to pull current framework documentation before generating code. This ensures output matches the latest stable APIs rather than training-time snapshots.

**Library IDs to resolve** (call `mcp__plugin_context7_context7__resolve-library-id`):

  • `react-tailwind` → resolve `"tailwindcss"`, then `"react"`
  • `vue` → resolve `"vue"`, then `"unocss"`
  • `svelte` → resolve `"svelte"`
  • `nextjs` → resolve `"next"`
  • `astro` → resolve `"astro"`
  • `flutter` → resolve `"flutter"`
  • `react-native` → resolve `"react-native"`, then `"expo"` if Expo is in use
  • `swiftui` → resolve `"swiftui"` (may fall back to Apple Developer docs)
  • `jetpack-compose` → resolve `"jetpack-compose"` or `"compose"`

**Documentation to query** (call `mcp__plugin_context7_context7__query-docs` with the resolved library ID):

  • React+Tailwind: query `"utility classes configuration theme extend"` on tailwindcss
  • Vue 3: query `"script setup defineProps composition api"` on vue
  • Svelte 5: query `"runes $state $props $derived"` on svelte
  • Next.js App Router: query `"server components client components use client"` on next
  • Astro: query `"component props client directives islands"` on astro
  • Flutter: query `"widget stateless stateful build context theme"` on flutter
  • React Native: query `"StyleSheet View Text Pressable platform"` on react-native
  • SwiftUI: query `"View body some ViewBuilder state binding"` on swiftui
  • Jetpack Compose: query `"Composable remember State modifier LazyColumn"` on jetpack-compose

Extract any **version-specific breaking changes** from the docs (e.g., Tailwind v4 CSS-first config vs v3 JS config, Svelte 5 rune syntax vs Svelte 4 stores). Apply these in the conversion step.

**Context7 Fallback**: If the tools are unavailable or return an error, proceed with the built-in framework knowledge from `framework-specialist.md`. Add a footer note to the output: `> ℹ Using cached framework knowledge — connect Context7 MCP for live documentation.`

3. Decompose into Components

Analyze the design and identify the component hierarchy:

Page
  ├─ Layout components (header, sidebar, main, footer)
  ├─ Feature components (hero, pricing-table, testimonials)
  └─ Atomic components (button, card, input, badge, avatar)

For complex designs, break into multiple files. For simple components, keep in one file.

**Interactivity scan**: Identify elements that need client state:

  • Forms, toggles, accordions, tabs, modals, dropdowns → need state
  • Static text, images, layout → no state needed (Server Component in Next.js, static in Astro)

4. Convert to Target Framework

Using the framework-specialist.md reference:

**React + Tailwind:**

  • Convert HTML classes to Tailwind equivalents
  • Extract props from repeated patterns
  • Create TypeScript interface for all props
  • Use `cn()` for conditional classes
  • Split into Server Component + Client Component where needed (for Next.js)
  • Generate: `ComponentName.tsx`, `globals.css` (tokens), `tailwind.config.ts`

**Vue 3 + UnoCSS:**

  • Convert to Single File Component (`<script setup>` + `<template>` + `<style>`)
  • Define typed props with `defineProps<T>()` + `withDefaults`
  • Convert event handlers to `emit` + `defineEmits`
  • Generate: `ComponentName.vue`, `uno.config.ts`

**Svelte 5:**

  • Convert to `.svelte` file using Svelte 5 rune syntax (`$props()`, `$state()`, `$derived()`)
  • Use `{@render children?.()}` for slot content
  • Keep styles in `<style>` block
  • Generate: `ComponentName.svelte`

**Next.js App Router:**

  • Determine Server vs Client component boundary
  • Server Component: data fetching, static markup — no `'use client'`
  • Client Component: event handlers, useState, useEffect — add `'use client'`
  • Add `metadata` export for page components
  • Generate: `page.tsx` or `ComponentName.tsx
Read more
@adityaraj0421
Ships withnaksha

Your agency's design brain. Always on, always yours. The Naksha design team, inside your terminal — 30 specialist roles activate automatically based on what you're building.

3561 skill7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
356
Star history of Adityaraj0421/naksha-studio on GitHub, a chart by star-history.com

Other commands on naksha.

ab-variants

ab-variants

Command

Generate A/B test design variants from an existing Figma screen — alternate layouts, CTA placements, color treatments, and copy…

@adityaraj0421@adityaraj0421Install Command
accessibility-audit

accessibility-audit

Command

Full WCAG AA accessibility audit on an HTML file — contrast ratios, keyboard navigation, semantic HTML, ARIA usage, touch…

@adityaraj0421@adityaraj0421Install Command
brand-kit

brand-kit

Command

Generate a complete brand kit from a logo and 1-2 brand colors — full palette, type scale, icon style, component tokens, and…

@adityaraj0421@adityaraj0421Install Command
brand-strategy

brand-strategy

Command

Define or audit a brand — positioning, visual identity system, voice and tone, and brand architecture.

@adityaraj0421@adityaraj0421Install Command
chart-design

chart-design

Command

Design a chart or data visualization — selects the right chart type, applies accessible color palettes, adds annotations, and…

@adityaraj0421@adityaraj0421Install Command
competitive-audit

competitive-audit

Command

Capture a competitor website with Playwright and extract its color system, typography, layout patterns, and 'steal this'…

@adityaraj0421@adityaraj0421Install Command

More commands from other plugins.

od-contribute
Auto-invoked

od-contribute

Command

Open a first-contribution PR (or bug issue) on nexu-io/open-design — works for non-coders too.

@nexu-io@nexu-ioInstall Command
design-deslop

design-deslop

Command

Strip the signatures that make a UI look AI-generated — flat hierarchy, no focal point, monotone layout, timid palettes, generic…

@dammyjay93@dammyjay93Install Command