Docs
⚑️ ⏐ Advanced
Best Practices

Best Practices

Palettes over Colors

When using Tailwind CSS, it's best to use palettes over colors when styling components. This is because palettes are more flexible and can be used in multiple places, while colors are more specific and can only be used in one place.

For example, instead of using bg-blue-500 like:

const Button = () => (
  <button className="bg-blue-500 text-white">Click me</button>
);

You should use bg-primary like:

const Button = () => (
  <button className="bg-primary text-white">Click me</button>
);