Introducing STWUI Themes - BREAKING CHANGES #101
Pinned
N00nDay
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are excited to announce the launch of STWUI Themes, a new feature that allows you to easily customize the look and feel of your website or application. STWUI comes with two themes - light and dark - which you can use without any extra effort. Each theme defines a set of colors that will be used on all STWUI components.
To use a theme, simply add the data-theme attribute to your HTML tag. For example, to use the dark theme, your HTML code should look like this:
If you want to use both the light and dark themes, you can modify your
tailwind.config.cjs
file by adding the following code:If you only want to use a specific theme for a section of your page, you can add the data-theme attribute to any element. For example, if you want a div to always use the light theme, you can add the
data-theme="light"
attribute to it. You can also nest themes and use multiple themes on a single HTML page.If you want to create your own custom theme, you can add it to your
tailwind.config.cjs
file. You can define the required colors for your theme, and STWUI will automatically generate the rest of the colors for you. Additionally, you can customize an existing theme by requiring it in yourtailwind.config.cjs
file and overriding some colors.With STWUI Themes, you can easily create a customized look and feel for your website or application. This will be readily available from v0.8.0-next and on but please be mindful that this update will create breaking changes to your app/websites/
Beta Was this translation helpful? Give feedback.
All reactions