component
SolidCreate UI component / widget / reusable piece. Triggers "create component", "new component", "add component", or naming a component (Button, Header, Card).
Web & Frontend 42 stars
3 forks Updated today MIT
Install
Quality Score: 86/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Create Darkroom Component
Create a React component following Darkroom conventions. **Detect the stack first** — satus (Next.js) and novus (React Router) have different conventions for client/server boundaries, image/link wrappers, and path aliases.
## Step 1 — Detect stack
Read `package.json`:
- `dependencies.next` present → Next.js / satus conventions
- `dependencies["react-router"]` or `devDependencies["@react-router/dev"]` → React Router / novus conventions
- Neither → ask user, or assume satus if unclear
## Step 2 — Resolve target paths
| Stack | Component path | CSS module path | Image wrapper | Link wrapper | Path alias |
|---|---|---|---|---|---|
| satus (Next.js) | `components/<name>/index.tsx` | `components/<name>/<name>.module.css` | `import { Image } from '@/components/image'` | `import { Link } from '@/components/link'` | `@/` |
| novus (React Router) | `components/<name>/index.tsx` | `components/<name>/<name>.module.css` | Native `<img>` (or project's wrapper if it exists) | `import { Link } from 'react-router'` | `~/` |
## Step 3 — Emit template
### satus / Next.js
```tsx
// components/<name>/index.tsx
// 'use client' — only add if component needs:
// - useState, useEffect, or other hooks
// - Event handlers (onClick, onChange, etc.)
// - Browser APIs (window, document, etc.)
import s from './<name>.module.css'
interface <Name>Props {
children?: React.ReactNode
className?: string
}
export function <Name>({ children, className }: <Name>Props) {
...
Details
- Author
- darkroomengineering
- Repository
- darkroomengineering/cc-settings
- Created
- 7 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Web & Frontend Listed
ui-component
Instructions for creating UI components following the design system, accessibility standards, and file structure conventions.
0 Updated 1 months ago
syniol Web & Frontend Listed
component-design
Create or restructure a UI component — architecture, component patterns, accessibility, design-system rules. Use when adding a new component, splitting a large one, or making one reusable. App-level work belongs to frontend-ui-engineering.
11 Updated today
ajyadav013 Web & Frontend Listed
react-component
Use when writing or editing a React component. Covers preferred patterns for functional components, prop types, and styling.
1 Updated today
LandonSchropp