0.0.3 • Published 10 months ago

@run-in-browser/theme v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

theme

npm CI LICENSE

The default theme for websites under RunInBrowser.

Click HERE to get a live preview.

Color variables can be found in HERE.

Install

pnpm i @run-in-browser/theme

Usage

Default usage

// main.ts
import "@run-in-browser/theme/css/none/index.css";

With UnoCSS

// uno.config.ts
import { presetNone } from "@run-in-browser/theme";
import { defineConfig, presetUno } from "unocss";

export default defineConfig({
  presets: [presetUno()],
  theme: {
    ...presetNone.unocss,
  },
});

Or with TailwindCSS

// tailwind.config.js
import { presetNone } from "@run-in-browser/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 "@run-in-browser/theme/css/shadcn/index.css";
// tailwind.config.js
import { presetShadcn } from "@run-in-browser/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));
}
0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago