awesome-repositories.com
المدونة
MCP
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
joe-bell avatar

joe-bell/cva

0
View on GitHub↗
6,849 نجوم·134 تفرعات·TypeScript·Apache-2.0·9 مشاهداتcva.style↗

Cva

cva is a TypeScript utility for defining and resolving visual variants for UI components with full type safety. It generates CSS class strings from typed variant definitions, enabling compile-time validation of component usage by deriving the union of all variant prop types from a configuration object.

The library distinguishes itself through compound variant matching, which activates styles only when multiple independent variant conditions are simultaneously satisfied, merging their class names. It also provides default value propagation to ensure consistent rendering when no explicit variant is chosen, and supports polymorphic element binding so the same variant logic can be applied to any HTML element type. For projects using Tailwind CSS, cva includes a conflict resolution mechanism that merges conflicting utility classes using a last-wins precedence rule.

The tool allows composing variant definitions, extracting variant prop types for reuse, and extending styled components while preserving each variant's styling. It handles class name concatenation gracefully, managing conditional and duplicate entries without runtime overhead.

Features

  • Variant Defaults - Provides default value propagation so components render consistently when no explicit variant is chosen.
  • Variant Prop Type Extractors - Infers the union of all variant prop values from a component definition for reuse in parent components.
  • Variant Prop Type Inferences - Derives the union of all variant prop types from a configuration object for compile-time validation.
  • Typed Variant Definitions - Defines component variants as typed objects so the compiler catches invalid combinations before runtime.
  • Variant Default Values - Assigns fallback variant values at definition time so components render consistently when no explicit prop is provided.
  • Inferred Prop Types - Derives the union of all variant prop types from a configuration object, enabling compile-time validation of component usage.
  • Polymorphic Component Rendering - Supports polymorphic element binding, allowing the same variant logic to be applied to any HTML element type.
  • Variant-Based Class Generators - Generates CSS class strings from typed variant definitions with zero runtime overhead.
  • Variant Prop Type Inferences - Derives the union of all variant prop types from a configuration object for compile-time validation.
  • Component Variant Presets - Defines visual or behavioral variations for a component and generates the correct class name string based on the chosen variant.
  • Variant Default Value Assignments - Assigns fallback values for variant props so a component renders a consistent style when no explicit variant is chosen.
  • Polymorphic Components - Provides polymorphic element binding so variant logic applies to any HTML element.
  • Reusable Variant Definitions - Combines multiple variant definitions into a single, type-safe class name resolver for complex component styling.
  • Static Variant Resolvers - Resolves component styles by mapping variant prop combinations to class strings through a statically defined configuration object.
  • Variant-Based Style Resolvers - Defines visual variants for a component and produces a function that resolves the correct class names based on selected variant props.
  • Compound Variant Activators - Ships a compound variant matching engine that activates styles only when multiple independent conditions are met.
  • Conditional Compound Variants - Activates style variants only when multiple independent variant conditions are simultaneously satisfied.
  • Variant Prop Type Inferences - Derives the union of all variant prop types from a configuration object for compile-time validation.
  • Compound Variant Activators - Provides compound variant matching that activates styles only when multiple independent conditions are simultaneously satisfied.
  • Multi-Condition Variant Activators - Activates compound variants when several independent variant conditions are met simultaneously, merging their class names.
  • Type-Safe Variant Combiners - Combines multiple variant selections into a single, type-safe class name string for a component.
  • Variant-Based Class Generators - Generates CSS class strings from typed variant definitions with full TypeScript type safety and zero runtime overhead.
  • Variant Definition Composers - Combines multiple variant definitions into a single, type-safe class name resolver for complex component styling.
  • Variant Prop Type Inferences - Derives the union of all variant prop types from a configuration object for compile-time validation.
  • Tailwind CSS Conflict Resolvers - Includes a conflict resolution mechanism that merges conflicting Tailwind utility classes using last-wins precedence.
  • Tailwind Class - Merges conflicting Tailwind CSS utility classes by wrapping variant definitions with a conflict-resolution utility.
  • Class String Joiners - Handles class name concatenation gracefully, managing conditional and duplicate entries without runtime overhead.
  • Conflict Resolvers - Includes a conflict resolution mechanism that merges conflicting Tailwind utility classes using last-wins precedence.
  • Variant-Based Component Extenders - Combines multiple variant-based class name strings into a single component, preserving each variant's styling.
  • Conflict Resolution Utilities - Includes a conflict resolution mechanism that merges conflicting Tailwind utility classes using a last-wins precedence rule.

سجل النجوم

مخطط تاريخ النجوم لـ joe-bell/cvaمخطط تاريخ النجوم لـ joe-bell/cva

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Cva

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Cva.
  • dcastil/tailwind-mergeالصورة الرمزية لـ dcastil

    dcastil/tailwind-merge

    5,648عرض على GitHub↗

    tailwind-merge is a utility library that resolves conflicting Tailwind CSS class strings when combining multiple sets of classes. It automatically detects and removes conflicting utility classes, keeping only the last class from each group that modifies the same CSS property, while preserving non-conflicting and non-Tailwind classes unchanged. The library handles complex conflict scenarios including modifier-order resolution, arbitrary value type detection, postfix modifier semantics, and asymmetric conflicts where one class group removes preceding classes from other groups but not vice versa

    TypeScriptcsstailwindcssutility-classes
    عرض على GitHub↗5,648
  • rebassjs/rebassالصورة الرمزية لـ rebassjs

    rebassjs/rebass

    7,905عرض على GitHub↗

    Rebass is a React design system library that provides a collection of theme-driven, responsive UI primitives. It functions as a theme-based layout engine, using a set of stateless components to standardize spacing, typography, and colors across a user interface. The library distinguishes itself by mapping style properties to a central design theme through a styled-system approach. This allows for responsive style mapping where components automatically adapt their appearance based on screen size and provides the ability to swap underlying HTML elements while preserving styling logic to maintai

    JavaScriptcolorcomponentscss
    عرض على GitHub↗7,905
  • reach/reach-uiالصورة الرمزية لـ reach

    reach/reach-ui

    5,977عرض على GitHub↗

    Reach UI is an open-source library of accessible, low-level React components designed to serve as a foundation for building design systems and interactive user interfaces. It is an accessibility-first toolkit that handles core concerns like ARIA attributes, focus management, and screen reader support automatically, without requiring developer configuration. The library is built as a collection of standalone packages, each managing its own lifecycle and dependencies, enabling granular adoption and tree-shaking. Components use a polymorphic rendering pattern, accepting an as prop to render as

    TypeScript
    عرض على GitHub↗5,977
  • system-ui/theme-uiالصورة الرمزية لـ system-ui

    system-ui/theme-ui

    5,405عرض على GitHub↗

    Theme-ui is a React theme framework and CSS-in-JS utility used for building themeable user interfaces. It functions as a design system tool that establishes centralized, constraint-based scales for colors, typography, and spacing to ensure visual consistency across applications. The framework distinguishes itself through an array-based responsive shorthand for mobile-first layouts and a dedicated color mode manager that synchronizes with browser preferences and persists user selections. It also features a system for creating named style variants to control component appearance via properties

    TypeScriptcolordesigndesign-system
    عرض على GitHub↗5,405
عرض جميع البدائل الـ 13 لـ Cva→

الأسئلة الشائعة

ما هي وظيفة joe-bell/cva؟

cva is a TypeScript utility for defining and resolving visual variants for UI components with full type safety. It generates CSS class strings from typed variant definitions, enabling compile-time validation of component usage by deriving the union of all variant prop types from a configuration object.

ما هي الميزات الرئيسية لـ joe-bell/cva؟

الميزات الرئيسية لـ joe-bell/cva هي: Variant Defaults, Variant Prop Type Extractors, Variant Prop Type Inferences, Typed Variant Definitions, Variant Default Values, Inferred Prop Types, Polymorphic Component Rendering, Variant-Based Class Generators.

ما هي البدائل مفتوحة المصدر لـ joe-bell/cva؟

تشمل البدائل مفتوحة المصدر لـ joe-bell/cva: dcastil/tailwind-merge — tailwind-merge is a utility library that resolves conflicting Tailwind CSS class strings when combining multiple sets… rebassjs/rebass — Rebass is a React design system library that provides a collection of theme-driven, responsive UI primitives. It… system-ui/theme-ui — Theme-ui is a React theme framework and CSS-in-JS utility used for building themeable user interfaces. It functions as… reach/reach-ui — Reach UI is an open-source library of accessible, low-level React components designed to serve as a foundation for… couds/react-bulma-components — This project is a component library that bridges the Bulma CSS framework with React. It provides a set of declarative… jedwatson/classnames — classnames is a JavaScript utility for conditionally joining CSS class names into a single space-separated string. It…