Tailus Themer is a theming library that provides modern and customizable themes for building your own UI Kit regardless of the Web framework you are using. It is built on top of Tailwind CSS and provides a variety of themes that can be easily customized to match your brand and style.
Tailus Themer is based on the concept of component-level theming. This means that each component in your application has its own theme, which can be customized independently of the other components. This makes it easy to create applications with a consistent look and feel, while still allowing you to customize the individual components to meet your specific needs.
Tailus Themer offers a number of features and benefits over other theming solutions, including:
Tailus Themer is easy to use and can be used to create UI Kits for applications of all sizes. To get started, simply install the Tailus Themer package, the needed component theme package and import it into your application. You can then customize the theme to match your brand and style using our themer
plugin or our online customizers.
npm install @tailus/themer
// tailwind.config.js
import themer from "@tailus/themer";
export default = {
theme: {
extend: {
// your theme here
},
},
plugins: [
themer({
// your customizations here
})
],
};
@tailus
components themes:// tailwind.config.js
export default {
content: [
// ... other paths
"./node_modules/@tailus/themer-**/dist/**/*.{js,ts}",
],
};
npm install @tailus/themer-form
npm install @tailus/themer-button
npm install @tailus/themer-card
import { outlinedForm as theme } from "@tailus/themer-form";
import { button } from "@tailus/themer-button";
import { card as cardTheme } from "@tailus/themer-card";
// Radix UI
import * as Form from "@radix-ui/react-form";
import { outlinedForm as theme } from "@tailus/themer-form";
import { button } from "@tailus/themer-button";
import { card as cardTheme } from "@tailus/themer-card";
const FormUI = () => (
<Form.Root className={cardTheme}>
<div className="space-y-4">
<Form.Field className={theme.field} name="email">
<Form.Label className={theme.label.sm}>Email</Form.Label>
<div className="space-y-1">
<Form.Control asChild>
<input className={theme.input.sm} type="email" required />
</Form.Control>
<Form.Message className={theme.message.warning} match="valueMissing">
Please enter your email
</Form.Message>
<Form.Message className={theme.message.danger} match="typeMismatch">
Please provide a valid email
</Form.Message>
</div>
</Form.Field>
<Form.Field className={theme.field} name="question">
<Form.Label className={theme.label.sm}>Question</Form.Label>
<div>
<Form.Control asChild>
<textarea className={theme.textarea.sm} rows={3} required />
</Form.Control>
<Form.Message className={theme.message.warning} match="valueMissing">
Please enter a question
</Form.Message>
</div>
</Form.Field>
<Form.Submit asChild>
<button className={button.primary.md + " w-full"}>
<span>Submit</span>
</button>
</Form.Submit>
</div>
</Form.Root>
);
export default FormUI;
Tailus Themer provides a number of ways to customize the theme to match your brand and style. You can customize the theme using the themer
plugin or the online customizers.
themer
pluginThe themer
plugin allows you to customize the theme using a simple and consistent API. To customize the theme, you can use the following syntax:
themer
plugin:The themer
plugin accepts two group of options:
You can use the preconfigs
to add consitent customizations to the components theme.
appearance
: Generate a theme according to your preferences, either light mode only, dark mode only or both, regardless of the darkMode
property in Tailwind CSS.
Accepts : "light" | "dark" | "both",
background
: Add consistent background colors to your theme.
Accepts : "light" | "lighter" | "hight" | "higher",
padding
: Add consistent padding to your theme.
Accepts : "small" | "medium" | "large" | "larger" | "largest",
border
: Add consistent border colors to your theme.
Accepts : "lighter" | "light" | "high" | "higher",
radius
: Add consistent border radius to your theme.
Accepts : "boxy" | "sharp" | "smooth" | "smoothest",
shadow
: Add consistent shadow to your theme.
Accepts : { size: "sm" | "md" | "lg" | "xl" | "xxl", opacity: number }
,
You can use the components
block to customize the components individually. The following components are supported:
accordion
alert
annonce
avatar
badge
button
card
feedback
: Customizations for feedback components.field
flag
menu
: Customizations for menu components.popover
select
switch
tabs
tost
tooltip
ui
: Border colors for accordion, annonce, card and separator components.module.exports = {
plugins: [
themer({
appearance: "light", // light | dark | both
background: "lighter", // light | lighter | hight | higher
padding: "largest", // small | medium | large | larger | largest
border: "light", // lighter | light | high | higher
radius: "smoothest", // boxy | sharp | smooth | smoothest
shadow: {
size: "md",
opacity: 5,
},
components: {
// ... components specific options
},
}),
],
};
Once you have added Tailus Themer to your Tailwind CSS configuration file, you can customize all the components with our preconfigs or specific components options.
The following example shows how to customize the accordion theme:
module.exports = {
plugins: [
themer({
appearance: "light", // light | dark | both
background: "lighter", // light | lighter | hight | higher
padding: "largest", // small | medium | large | larger | largest
border: "light", // lighter | light | high | higher
radius: "smoothest", // boxy | sharp | smooth | smoothest
shadow: {
size: "md",
opacity: 5,
},
components: {
accordion: {
rounded: "xl",
softBg: "100",
ghostBg: "100",
shadow: {
size: "xxl",
opacity: 5,
},
dark: {
softBg: "900",
ghostBg: "900",
elevatedBg: "900",
},
},
},
}),
],
};
This code will override the accordion
default theme with the following values:
{
rounded: "xl",
softBg: "100",
ghostBg: "100",
shadow: {
size: "xxl",
opacity: 5,
},
dark: {
softBg: "900",
ghostBg: "900",
elevatedBg: "900",
},
}
To learn more about the available options for each component, please refer to the components reference.
Tailus Themer provides two online customizers that allow you to customize the theme visually. To use the customizers, simply visit the following links:
Tailus Themer is an open source project and we welcome contributions from the community. If you have any ideas or suggestions for how to improve Tailus Themer, please feel free to open an issue or submit a pull request.
If you have any questions or need help with using Tailus Themer, please feel free to reach out to us on Twitter.
Tailus Themer is licensed under the MIT license.
Tailus Themer is built on top of Tailwind CSS and uses the following open source libraries:
Additional Information
We are responsive to user feedback, so if you have any suggestions or requests, you can be sure that they will be considered.