Getting Started
InstallationManual InstallationChangeLog
soon
CLIDocumentation
Foundation
Core Color SystemIcons
soon
Mapping Color SystemModsTypography
Components
ActionButtonActionsGroupAlertDialogAvatarBadgeButtonCalendarCardCheckboxDialogDividerDropDownMenuFormInputinputOTPLinkButtonPopoverRadioSelectSkeletonSpinLoadingSwitchTabFormItemTableTextareaTooltip
Custom
BadgeFieldDatePickerFieldHintImageAttachmentInnerLabelFieldInputFieldLabelFieldPasswordLevelRadioCardSlideDatePickerTreeDropDown
Layout
C LayoutField SectionTree Sub Layout

Installation

Installation

To install the TORCH Glare Components Library, run the following command to initialize your project.
Note: This library uses Tailwind CSS, so ensure you have it installed first. this command will install the required dependencies and generate a glare.json file, where you can customize the installation path for your components
npx torch-glare@latest init
Now you have a glare.json file in the root of your project, you can adjust the path where you want to install the components.
glare.json
1{ 2 "path": "./src" // the path where you want to install the components 3}
Add Remix Icons CDN to your html file or metadata with SF-Pro font as it's the standard font family for the TORCH Glare Components.
index.html
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

Configure Tailwind

For Tailwind CSS version 4

If you are using Tailwind CSS version 4, you need to add the following code to your global.css file.
global.css
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";

For Tailwind CSS version 3

For Tailwind CSS version 3, you need to add the following dependency to your project and copy the code below to your tailwind.config file.
npm install mapping-color-system@latest
tailwind.config.js
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};
Make sure to add the following code to your tailwind.config.ts file.
  • specify the path of the components in tailwind config file.
  • add the plugins to the plugins array.
  • add the mappingVars to the extend components colors object.

Adding Components

Now, you can start adding components to your project, run the following command to install the TORCH Glare Components.
Note: This command will make dropdown list of available components.
npx torch-glare@latest add
or specify the components you want to install.
npx torch-glare@latest add Button

Usage

App.tsx
1import { Button } from "./Button"; 2function App() { 3 return ( 4 <Button variant="PrimeStyle" size="M"> 5 Click Me 6 </Button> 7 ); 8}

Having Issues?

If you have any issues with installation, you can use the manual installation page for manual installation.