designing-components

Create reusable Tailwind CSS UI components with separate CSS files.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/Emz1998/nexly-notes --skill designing-components
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: designing-components
Source: https://github.com/Emz1998/nexly-notes/tree/main/archive/skills/code-style/components
Command: npx skills add https://github.com/Emz1998/nexly-notes --skill designing-components

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach for designing and styling UI components, ensuring consistency, modularity, and adherence to Tailwind CSS best practices. It guides the use of @apply and @layer components directives, and specifies component creation locations to maintain a clean codebase.

Core Features & Use Cases

  • Tailwind CSS Best Practices: Enforces modularity, separate CSS files, and use of @apply and @layer components.
  • Tailwind v4.1 Context: Directs to specific documentation for design principles, custom styles, functions, and directives.
  • Component Creation Guidelines: Specifies where to create new components (srs/components) and what not to touch (srs/components/ui).
  • Use Case: When building a new UI component for a Next.js app, use this skill to ensure all Tailwind CSS styling follows the project's conventions, including using nested classes and custom utilities.

Quick Start

Design a new card component in srs/components, creating a separate CSS file and using Tailwind CSS @layer components for styling.

Frequently Asked Questions about designing-components

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

FAQPage Schema
How do I create reusable UI components with Tailwind CSS?

Create reusable UI components by placing them in `srs/components` with a separate CSS file using Tailwind's `@apply` and `@layer components` directives. This approach ensures consistency and modularity across your Next.js application while following Tailwind v4 best practices.

What's the best way to organize component styling in a Next.js project?

Organize component styling by creating dedicated CSS files alongside components in `srs/components`, using `@layer components` for component definitions and nested classes for parent-child element relationships. This structure maintains a clean codebase and enforces Tailwind conventions.

Can I use @apply and @layer components with Tailwind CSS v4?

Yes, `@apply` and `@layer components` are core Tailwind v4 directives for building modular components. Use `@layer components` to define custom component classes and `@apply` to compose utility combinations within separate CSS files alongside your component definitions.

How do I implement nested classes for parent and child elements in Tailwind?

Implement nested classes in your component CSS file using `@layer components` with selectors for parent and child elements. Add custom utilities and variants as needed to handle complex styling relationships while keeping your component structure maintainable.

What should I avoid when designing Tailwind components?

Avoid modifying `srs/components/ui` directly; instead, create new components in the `srs/components` root with separate CSS files. Keep component logic isolated and maintain adherence to Tailwind v4 documentation for consistency across your frontend.