Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mhrastegari/blazorcva

Blazor Class Variants Authority
https://github.com/mhrastegari/blazorcva

Last synced: 24 days ago
JSON representation

Blazor Class Variants Authority

Awesome Lists containing this project

README

        

# BlazorCVA

BlazorCVA is a library designed to simplify the management of CSS classes in Blazor applications. Inspired by the [Class Variance Authority (CVA)](https://cva.style/), BlazorCVA provides a type-safe, flexible way to manage and apply CSS classes based on component variants, ensuring a clean and maintainable approach to styling.

## Introduction

In modern UI development, Some developers need full control over their stylesheets, prefer using frameworks like Tailwind CSS, or simply enjoy writing their own CSS. When working with traditional CSS, managing variants—matching classes to props and handling types—can become cumbersome.

BlazorCVA aims to streamline this process by addressing these pain points. With BlazorCVA, you can focus on the fun aspects of UI development without getting bogged down by the intricacies of CSS variant management.

## Features

- **Type-Safe Variants:** Define and manage CSS classes based on component variants with type safety.
- **Flexible Conditions:** Use simple values or custom predicates to create complex variant conditions.
- **Seamless Integration:** Easily integrate with Blazor components and manage dynamic class names.