component-variant
CommunityGenerate tailwind-variants and UI components
Authortheodrosyimer
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a consistent, repeatable way to define tailwind-variants (tv()) and implement React/React Native components that consume them, reducing duplicated styling, preventing ad-hoc utility usage, and ensuring cross-platform compatibility.
Core Features & Use Cases
- Variant Definitions: Create framework-agnostic tv() definitions that centralize base styles, variants, compoundVariants, and defaultVariants.
- Component Consumption: Build React and React Native components that import variant definitions, export inferred variant prop types, and accept class/className overrides for safe merging.
- Patterns & Compatibility: Support slots for multi-element components, extendable base components, semantic token naming, and Uniwind compatibility for web/native parity.
Quick Start
Create a new tv() definition for a Button in packages/ui/src/variants/button.ts and a corresponding Button component in packages/ui/src/components/Button.tsx that imports the variant and exports the inferred ButtonVariants type.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: component-variant Download link: https://github.com/theodrosyimer/.dotfiles/archive/main.zip#component-variant Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.