Getting Started
To install the TORCH Glare Components Library, run the following command to initialize your project.
Docs
npx torch-glare@latest init1{
2 "path": "./src" // the path where you want to install the components
3}1<head>
2 <link
3 href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css"
4 rel="stylesheet"
5 />
6 <link
7 rel="stylesheet"
8 href="https://cdn.statically.io/gh/TORCH-Corp/SF-PRO-FONT/main/font/fonts.css"
9 />
10
11 <link
12 rel="preload"
13 href="https://cdn.statically.io/gh/TORCH-Corp/SF-PRO-FONT/main/font/SF-Pro.woff2"
14 as="font"
15 type="font/woff2"
16 />
17</head>
18 1@import "tailwindcss";
2/* Every @import must come BEFORE the @plugin rules. CSS requires imports to precede
3 other at-rules, so a bundler silently drops any that come later — which would remove
4 the colour variables and the radius/container/breakpoint scales. */
5@import "mapping-color-system-v4/tailwindVars.css";
6@import "glare-torch-mode/theme.css";
7@plugin "glare-torch-mode";
8@plugin "tailwind-scrollbar-hide";
9@plugin "tailwindcss-animate";
10@plugin "glare-typography";
11@plugin "mapping-color-system-v4";1@theme {
2 /* Corner radius — yields rounded-radius-* */
3 --radius-radius-none: 0px;
4 --radius-radius-xs: 2px;
5 --radius-radius-sm: 4px;
6 --radius-radius-md: 6px;
7 --radius-radius-lg: 8px;
8 --radius-radius-xl: 12px;
9 --radius-radius-2xl: 16px;
10 --radius-radius-3xl: 24px;
11 --radius-radius-4xl: 32px;
12 --radius-radius-5xl: 40px;
13 --radius-radius-6xl: 48px;
14 --radius-radius-round: 9999px;
15
16 /* Container-query sizes for the @md: variants used by FieldSection / FormRenderer */
17 --container-xs: 320px;
18 --container-sm: 600px;
19 --container-md: 650px;
20 --container-lg: 1024px;
21 --container-xl: 1280px;
22 --container-2xl: 1536px;
23
24 /* Viewport breakpoints — sm is 600px rather than Tailwind's 640 */
25 --breakpoint-sm: 600px;
26 --breakpoint-md: 768px;
27 --breakpoint-lg: 1024px;
28 --breakpoint-xl: 1280px;
29 --breakpoint-2xl: 1536px;
30}npm install mapping-color-system@latest glare-torch-mode@latest @tailwindcss/container-queries1const { plugin, mappingVars } = require('mapping-color-system')
2// Design tokens plus the shared radius / container / screen scales.
3const torchMode = require('glare-torch-mode')
4
5module.exports = {
6 content: [
7 ...
8 // put your path that your use in glare.json file. for example:
9 "./src/**/*.{js,ts,jsx,tsx,mdx}",
10 ],
11 theme: {
12 extend: {
13 colors: mappingVars,
14 borderRadius: torchMode.borderRadius,
15 containers: torchMode.containers,
16 },
17 },
18 // Top level, not inside extend — this replaces Tailwind's breakpoints.
19 screens: torchMode.screens,
20 plugins: [
21 plugin,
22 require('@tailwindcss/container-queries'),
23 require('tailwindcss-animate'),
24 require('tailwind-scrollbar-hide'),
25 require('glare-typography'),
26 torchMode,
27 function ({ addVariant }) {
28 addVariant("rtl", ['&[dir="rtl"]', '[dir="rtl"] &']);
29 addVariant("ltr", ['&[dir="ltr"]', '[dir="ltr"] &']);
30 },
31 ],
32};npx torch-glare@latest addnpx torch-glare@latest add Button1import { Button } from "./Button";
2function App() {
3 return (
4 <Button variant="PrimeStyle" size="M">
5 Click Me
6 </Button>
7 );
8}