Create Component
SkillFiles & storageLets your agent create a new Spark UI component with its files, styles, tests, stories, and docs.
Use Create Component in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Create Component and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Create Component skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Create a new Spark UI component with complete file structure including component, styles, tests, stories, and documentation. Use when the user wants to create a new component or add a component to the design system.
What this skill tells your AI
The instructions your AI receives, as published by leboncoin/spark-web in .cursor/skills/create-component/SKILL.md and read by Ahel’s review.
Create a new Spark UI component following the project's standards and file structure.
When to Use
- User wants to create a new component
- User mentions "new component", "add component", or "create component"
- User is implementing a component from a design
Instructions
-
Determine component location: Components go in
packages/components/src/<component-name>/ -
Create the file structure:
component-name/ ├── ComponentName.tsx # Main component ├── ComponentName.styles.tsx # Styling with CVA ├── ComponentName.test.tsx # Unit tests ├── ComponentName.stories.tsx # Storybook stories ├── ComponentName.doc.mdx # Documentation ├── index.ts # Exports └── variants/ # Style variants (if applicable) -
Component Implementation:
- Use TypeScript with strict typing
- Implement polymorphic behavior with
asChildprop if needed - Use CVA (Class Variance Authority) for styling variants
- Include
data-spark-componentattribute - Ensure WCAG 2.1 AA compliance
- Use proper ARIA attributes
-
Styling:
- Create
ComponentName.styles.tsxwith CVA - Define variants (size, variant, etc.)
- Use TailwindCSS classes
- Create
-
Tests:
- Create
ComponentName.test.tsxwith Vitest + React Testing Library - Test rendering, props, variants, and accessibility
- Test user interactions
- Create
-
Stories:
- Create
ComponentName.stories.tsxfollowing Storybook CSF format - Use
Components/*meta structure - Create stories for: Default, Uncontrolled, Controlled, and other variants
- One story per prop/feature
- Create
-
Documentation:
- Create
ComponentName.doc.mdxwith sections in this order:- Title (H1)
- Meta (link to stories)
- Install
- Import
- Props table (using ArgTypes component)
- Usage (Default, Uncontrolled, Controlled, others alphabetically)
- Advanced Usage
- Accessibility
- Create
-
Exports:
- Create
index.tswith named exports - Export component, types, and sub-components if compound
- Create
-
For Compound Components:
- Use Object.assign pattern
- Set display names for all sub-components
- Document sub-components in ArgTypes
-
Verify:
- Run
npm run lintto check code quality - Run
npm run typecheckto verify types - Run tests to ensure they pass
- Check Storybook renders correctly
- Run
Examples
Reference existing components in packages/components/src/ for patterns:
- Simple component:
badge/,button/ - Compound component:
card/,input/,accordion/ - Complex component:
combobox/,select/
Signals
- GitHub stars
- 93
- Forks
- 27
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
create-component-leboncoin- Source
- github.com/leboncoin/spark-web
github.com/leboncoin/spark-web
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptreact-component-performance
Skill · davila7
The pick for Reactreact-doctor
Skill · millionco
The pick for Reacttailwind
Skill · alecs5am
The pick for Tailwindtailwind-design-system
Skill · davila7
The pick for Tailwind