dimanche 12 février 2023

What is the smartest way of creating complex custom themed components with Chakra UI?

We want to implement a scalable way of using Chakra UI to create complex custom components with our custom theme styles. But we are finding it difficult to crack which approach would be most scalable.

For instance, let’s say we want to create a ExerciseButton that has a text, an image, and a progress bar that displays how much of the exercise the user has completed

We have thought about different approaches.

  1. Create variant styles for each of the sub Chakra Ui components.
  2. Create a new component, Exercise Button and style its parts

Aucun commentaire:

Enregistrer un commentaire