0.2.1 • Published 10 months ago
@luyejiu/theme v0.2.1
@luyejiu/theme
The default style for websites under luyejiu.dev and luyejiu.live.
Click HERE to get a live preview.
Color variables can be found in HERE.
Install
pnpm i @luyejiu/theme
Usage
Default usage
// main.ts
import "@luyejiu/theme/css/none/index.css";
With UnoCSS
// uno.config.ts
import { presetNone } from "@luyejiu/theme";
import { defineConfig, presetUno } from "unocss";
export default defineConfig({
presets: [presetUno()],
theme: {
...presetNone.unocss,
},
});
Or with TailwindCSS
// tailwind.config.js
import { presetNone } from "@luyejiu/theme";
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{html,js}"],
theme: {
...presetNone.tailwind,
},
plugins: [],
};
<div class="text-primary-foreground bg-primary">
Hello world!
</div>
.usage-in-css {
color: rgb(var(--primary-foreground));
background-color: rgb(var(--primary));
}
Using with Shadcn
// main.ts
import "@luyejiu/theme/css/shadcn/index.css";
// tailwind.config.js
import { presetShadcn } from "@luyejiu/theme";
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{html,js}"],
theme: {
...presetShadcn.tailwind,
},
plugins: [],
};
<div class="text-primary-foreground bg-primary">
Hello world!
</div>
.usage-in-css {
color: hsl(var(--primary-foreground));
background-color: hsl(var(--primary));
}