Getting Started
To install the TORCH Glare Components Library, run the following command to initialize your project.
Docs
npx torch-glare@latest init
1{
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@plugin "glare-torch-mode";
3@plugin "glare-typography";
4@plugin "mapping-color-system-v4";
5@import "mapping-color-system-v4/tailwindVars.css";
npm install mapping-color-system@latest
1const { plugin: plugin, mappingVars } = require('mapping-color-system')
2
3module.exports = {
4 content: [
5 ...
6 // put your path that your use in glare.json file. for example:
7 "./src/**/*.{js,ts,jsx,tsx,mdx}",
8 ],
9 theme: {
10 extend: {
11 colors: mappingVars,
12 },
13 },
14 plugins: [
15 plugin,
16 require('tailwindcss-animate'),
17 require('tailwind-scrollbar-hide'),
18 require('glare-typography'),
19 require('glare-torch-mode'),
20 function ({ addVariant }: any) {
21 addVariant("rtl", '&[dir="rtl"]');
22 addVariant("ltr", '&[dir="ltr"]');
23 },
24 ],
25};
npx torch-glare@latest add
npx torch-glare@latest add Button
1import { Button } from "./Button";
2function App() {
3 return (
4 <Button variant="PrimeStyle" size="M">
5 Click Me
6 </Button>
7 );
8}