Authoring Components with CVA + tailwindcss — Compound Variants (2 / 4)

Published: 30 August 2023
on channel: React Tips with Brooks Lybrand
1,785
59

CVA (class-variance-authority) is an incredibly simple, yet powerful library for creating typed variants out of regular ol' css classes. This series walks through how to leverage CVA with tailwindcss to author a Button component in React.

In this video we leverage the compoundVariants API to extend our Button component to support rounded buttons.

Feel free to follow along or checkout the code for yourself: https://github.com/brookslybrand/cva-...

00:00 Introduction
00:50 Compound Variants
03:29 Examples & final tweaks


On this page of the site you can watch the video online Authoring Components with CVA + tailwindcss — Compound Variants (2 / 4) with a duration of hours minute second in good quality, which was uploaded by the user React Tips with Brooks Lybrand 30 August 2023, share the link with friends and acquaintances, this video has already been watched 1,785 times on youtube and it was liked by 59 viewers. Enjoy your viewing!