react-headless-dev

Implement unstyled, logic-only React headless components and custom hooks with namespace exports.

1.0k|75|Updated Mar 11, 2021
One-click install
npx skills add https://github.com/daangn/seed-design --skill react-headless-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-headless-dev
Source: https://github.com/daangn/seed-design/tree/main/.claude/skills/react-headless-dev
Command: npx skills add https://github.com/daangn/seed-design --skill react-headless-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables the development of unstyled, logic-only React headless components and custom hooks, providing a solid foundation for styling by @seed-design/react.

Core Features & Use Cases

  • Headless Architecture: Create data-driven primitives without styling.
  • Custom Hooks: Implement state management and business logic in dedicated hooks.
  • Namespace & Composition: Organize multi-part components with namespace exports.

Quick Start

Create a new headless component by adding a folder under packages/react-headless, implementing use{Component}.ts and the component file, then export from index.

Frequently Asked Questions about react-headless-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build unstyled React components with custom hooks?

Headless React components separate logic from styling by implementing state management and behavior in custom hooks, then exporting unstyled primitives. Create a `use{Component}.ts` hook to handle state and logic, then build the component file that consumes it, organizing multi-part exports with namespace patterns for composition.

What's the difference between headless components and styled components?

Headless components provide only logic, state, and data attributes without CSS, letting you apply styling separately. This approach decouples business logic from visual presentation, enabling multiple design systems—like @seed-design/react—to style the same primitives differently without duplicating logic.

How do I structure multi-part React components with namespaces?

Use namespace-based exports to organize related primitives together. Export a parent component as the namespace, then attach sub-components as properties (e.g., `Dialog.Trigger`, `Dialog.Content`). This pattern groups related logic while keeping composition explicit and readable.

Can I use data attributes to represent component state in headless React?

Yes, data attributes serve as state indicators in headless components, enabling styling and testing hooks without direct style coupling. Define and apply data attributes (e.g., `data-state`, `data-disabled`) in your hooks and components to reflect internal state, letting consumers query and style based on these attributes.

What's the advantage of extracting logic into custom hooks for React primitives?

Custom hooks isolate reusable state management and behavior, making it composable across multiple components. This separation lets you test logic independently, reuse hooks in different contexts, and refactor business logic without touching component rendering—core to maintainable headless architecture.

Do I need a styling framework to use headless React components?

No, headless components work without styling frameworks. They output unstyled, accessible primitives you can style with any CSS approach. However, styling frameworks like @seed-design/react are designed to consume headless components and provide pre-built visual designs.