gluestack-ui-v4:variants

Define type-safe component variants with tva for Gluestack UI v4.

1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/gluestack/agent-skills --skill gluestack-ui-v4-variants
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gluestack-ui-v4:variants
Source: https://github.com/gluestack/agent-skills/tree/main/.agents/skills/gluestack-ui-v4/variants
Command: npx skills add https://github.com/gluestack/agent-skills --skill gluestack-ui-v4-variants

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This sub-skill provides a structured approach to creating and managing component variants for Gluestack UI v4, reducing duplication and enforcing consistency across a design system.

Core Features & Use Cases

  • Variant planning for base, size, and state variants across components.
  • Extending existing components by adding new variants while preserving original ones.
  • Parent-child variant relationships enabling children to react to parent state via context.
  • Compound variants and defaults to handle complex combinations with type-safe definitions.

Quick Start

Start by outlining the base component and the slight variants, then implement with tva and React components, and apply the variants in your UI codebase.

Frequently Asked Questions about gluestack-ui-v4:variants

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

FAQPage Schema
How do I create type-safe React component variants in a design system?

Type-safe React component variants are created using the tva tool to define base, size, and state variants. This enforces consistency and reduces duplication across your design system in TypeScript projects.

How do I manage parent-child variant relationships in React components?

Parent-child variant relationships are managed by passing parent state via context, enabling children to react dynamically. This structured approach maintains scalable variant systems without prop drilling.

Can I extend existing React components with new variants without breaking original ones?

Existing React components can be extended with new variants while preserving the original definitions. The tva tool allows developers to add base, size, and state variants without overriding previous component architecture.

What are compound variants and how do I define them for React UI components?

Compound variants handle complex combinations of base, size, and state definitions with type-safe configurations. They are defined using tva to ensure consistent styling when multiple variant conditions apply simultaneously.

Does tva work with TypeScript for scalable UI variant management?

Tva works with TypeScript to provide type-safe variant definitions for scalable UI component architecture. It satisfies requirements for default and compound variants in React projects requiring robust design systems.

What is the best way to plan UI variants for a React component architecture?

Planning UI variants involves outlining base components and slight variations, then implementing them with tva. This structured approach covers base, size, state, and parent-child relationships for consistent documentation.