Clean, modern and beautiful Tailwind CSS components.
⚠️ This is a dev pre-release.
We introduce the theme customization in the tailwind.config.js
.
Install
npm install [email protected]
We can add, modify or delete themes with the new configuration, since RippleUI loads light and dark mode by default you can disable this behavior.
/** @type {import('rippleui/dist/js/types/config.types').Config} */
const config = {
themes: [
{
themeName: "custom",
colorScheme: "dark",
colors: {
primary: "#573242",
backgroundPrimary: "#123673",
// Same Variables
},
},
],
};
themeName
property as light
or dark
/** @type {import('rippleui/dist/js/types/config.types').Config} */
const config = {
themes: [
{
themeName: "light",
colors: {
primary: "#573242",
},
},
],
};
/** @type {import('rippleui/dist/js/types/config.types').Config} */
const config = {
removeThemes: ["dark"],
};
background-color
and color
properties that are by default turned on you can disable this behavior./** @type {import('rippleui/dist/js/types/config.types').Config} */
const config = {
defaultStyle: false,
};
This is a fully example using the config
in the tailwind.config.js
add the following code
/** @type {import('rippleui/dist/js/types/config.types').Config} */
const config = {
defaultStyle: true,
removeThemes: [],
themes: [
{
themeName: "light",
colorScheme: "light",
colors: {
// Customize Colors
primary: "#235264",
},
},
{
themeName: "custom",
colorScheme: "dark",
colors: {
primary: "#573242",
backgroundPrimary: "#123673",
// Same Variables
},
},
],
};
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "class",
content: [],
rippleui: {
...config,
},
theme: {
extend: {},
},
plugins: [require("rippleui")],
};
/** @type {import('rippleui/dist/js/types/config.types').Config} */
const config = {
themes: [
{
themeName: "light",
colorScheme: "dark",
colors: {
! customColor: "#123673",
},
},
],
};
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "class",
content: [],
- rippleui: {
- ...config,
- },
theme: {
extend: {},
},
+ plugins: [require("rippleui")({
+ ....config
+ )],
};