Authoring Components with CVA + tailwindcss — Icon Buttons (3 / 4)

Описание к видео Authoring Components with CVA + tailwindcss — Icon Buttons (3 / 4)

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 will add icons to the Button component, as well as create an IconButton component.

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

00:00 Introduction
00:37 Leading and trailing icons
08:37 "Private" variants
11:59 Creating an IconButton component
15:17 Icons and screen readers
17:07 Final tweaks

Комментарии

Информация по комментариям в разработке