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.
59
67%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.cursor/skills/create-component/SKILL.mdCreate a new Spark UI component following the project's standards and file structure.
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:
asChild prop if neededdata-spark-component attributeStyling:
ComponentName.styles.tsx with CVATests:
ComponentName.test.tsx with Vitest + React Testing LibraryStories:
ComponentName.stories.tsx following Storybook CSF formatComponents/* meta structureDocumentation:
ComponentName.doc.mdx with sections in this order:
Exports:
index.ts with named exportsFor Compound Components:
Verify:
npm run lint to check code qualitynpm run typecheck to verify typesReference existing components in packages/components/src/ for patterns:
badge/, button/card/, input/, accordion/combobox/, select/76a3678
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.