A guide on customizing AueraUI styles and Tailwind config to fit your app's design.
What is design without flexibility? That’s why AueraUI allows you to easily customize its default style variables, giving you complete control over your application’s look and feel.
Basically, there are two ways to customize AueraUI components: one gives you full control, and the other is the more traditional approach.
This approach utilizes className
or inline styles for a straightforward,
customizable solution to modify components.
Let's override the default styles of the Button component.
App.tsx
This approach provides full control over component styles by ejecting default styles using AueraUI CLI. It allows you to modify or replace the underlying styles directly to achieve a completely custom design.
AueraUI comes with a CLI tool which provides an easy way to customize styles and configuration.
Use the eject
command to access and modify default styles or Tailwind's extended configuration.
Use the following command to view all available eject options:
npx auera-ui eject
You will be prompted to select what you want to eject:
What do you want to eject?│ ● auera.css│ ○ tailwind.extend.ts
Add the appropriate flag to the eject command to target specific files:
--css
: Ejects the default auera.css
file, allowing you to modify AueraUI's global styles.npx auera-ui eject --css
--config
: Ejects the tailwind.extend.ts
file, enabling you to customize Tailwind's extended configuration.npx auera-ui eject --config
--css
flag generates the auera.css
file, typically in a designated directory (e.g., src/styles/
).--config
flag generates the tailwind.extend.ts
file, usually in the root directory.Open the ejected files and modify them as needed to suit your application’s design.
auera.css
):auera.css
tailwind.extend.ts
):tailwind.extend.ts
After customizing, ensure the changes are reflected in your project by replacing the previously imported files with the ejected versions.
global.css
global.css
tailwind.extend.ts
tailwind.config.ts
This process ensures flexibility and empowers you to take full control of your design, aligning with AueraUI’s focus on customization and adaptability.