### Install Lightswind CLI Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/README.md Install the Lightswind CLI to manage components and project setup. This is the first step before initializing the library in your project. ```bash npm install lightswind@latest ``` -------------------------------- ### Initialize Lightswind Project Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/README.md Run the initialization command to set up Lightswind in your project. The CLI automatically detects your framework (Next.js, Vite, CRA) and configures Tailwind. ```bash npx lightswind@latest init ``` -------------------------------- ### Initialize Lightswind in Next.js Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/README.md Use this command to set up a new Next.js project with TypeScript, Tailwind CSS, and ESLint, then initialize Lightswind. ```bash npx create-next-app@latest my-app --typescript --tailwind --eslint cd my-app npx lightswind@latest init ``` -------------------------------- ### Tweakpane Configuration and Event Listener Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/Components/index.html Initializes Tweakpane for UI controls and sets up an event listener to inject cursor position into CSS variables. This allows for dynamic styling based on mouse movement. ```javascript import { Pane } from "https://cdn.jsdelivr.net/npm/tweakpane@4.0.5/dist/tweakpane.min.js"; // ----------------- TWEAKPANE ------------------ const PARAMS = { disableSpotlight: false, spotlightSize: 150, spotlightSaturation: 25, spotlightLuminosity: 50, boxShadow: true, }; // ----------------- TWEAKPANE ------------------ // cursor position variable injection const injectCursorPosition = ({ x, y }) => { document.documentElement.style.setProperty("--x", x.toFixed(2)); document.documentElement.style.setProperty("--y", y.toFixed(2)); }; document.body.addEventListener("pointermove", injectCursorPosition); ``` -------------------------------- ### Add a Component with Lightswind CLI Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/README.md Use the CLI to add specific components to your project. The command automatically handles dependencies for the selected component. ```bash npx lightswind@latest add globe ``` -------------------------------- ### Expand ESLint for React-Specific Linting Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/Templates/portfolio01Source/README.md Integrate eslint-plugin-react-x and eslint-plugin-react-dom for React and React DOM specific lint rules. Configure ESLint to extend these plugins' recommended configurations. ```javascript // eslint.config.js import reactX from 'eslint-plugin-react-x' import reactDom from 'eslint-plugin-react-dom' export default tseslint.config([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'] extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` -------------------------------- ### CSS Variables and Base Styles Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/Components/index.html Defines global CSS variables for theming and sets up base styles for the body and layout. These variables control colors, sizes, and shadows. ```css :root { --bg: hsl(246 44% 4%); --card-bg: hsl(235 40% 2%); --color: hsl(240 18% 80%); --border-size: -3px; --card-size: 280px; --border-radius: 20px; --outer-border-radius: 22px; --shadow: 0 10px 20px black; --spotlight-size: 150; --active: 1; --hue-val: 0; --hue-sat: 25; --hue-lum: 50; } *, *:after, *:before { box-sizing: border-box; } @layer base, card; @layer base { body { font-family: sans-serif; color: var(--color); min-height: 100vh; display: grid; place-items: center; overflow: hidden; position: relative; background: var(--bg); } main { display: flex; flex-direction: column; align-items: center; gap: 30px; } .ric-link { position: absolute; top: 1.5rem; left: 1.5rem; } a svg { width: 60px; heigth: auto; transition: transform 0.2s, filter 0.2s; } a svg:hover { transform: scale(1.2) rotate(-10deg); filter: drop-shadow(rgba(255 255 255 / 0.2) 0 2px 10px); } } ``` -------------------------------- ### Expand ESLint for Type-Aware Linting Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/Templates/portfolio01Source/README.md Configure ESLint to enable type-aware lint rules by extending tseslint.configs.recommendedTypeChecked, strictTypeChecked, or stylisticTypeChecked. Ensure tsconfig paths are correctly set in languageOptions. ```javascript export default tseslint.config([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'] extends: [ // Other configs... // Remove tseslint.configs.recommended and replace with this ...tseslint.configs.recommendedTypeChecked, // Alternatively, use this for stricter rules ...tseslint.configs.strictTypeChecked, // Optionally, add this for stylistic rules ...tseslint.configs.stylisticTypeChecked, // Other configs... ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` -------------------------------- ### Card Component Styles Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/Components/index.html Styles for the card components, including background gradients, borders, shadows, and spotlight effects based on cursor position. Different card variants are defined by `--hue-val`. ```css @layer cards { .cards { display: flex; gap: 3rem; position: relative; } .card-1 { --hue-val: 220; } .card-2 { --hue-val: 50; } .card-3 { --hue-val: 170; } .card { --alpha: calc(var(--active, 0) * 0.15); --radial-bg: radial-gradient( circle at calc(var(--x) * 1px) calc(var(--y) * 1px), hsl( var(--hue-val, 240) calc(var(--hue-sat, 0) * 1%) calc(var(--hue-lum, 100) * 1%) / var(--alpha) ), transparent calc(var(--spotlight-size) * 1px) ); width: var(--card-size); aspect-ratio: 4 / 5; background: var(--radial-bg), var(--card-bg); background-attachment: fixed; position: relative; display: flex; flex-direction: column; padding: 8px 20px; justify-content: space-evenly; border-radius: var(--border-radius); } .card::before { content: ""; inset: var(--border-size); position: absolute; z-index: -1; border-radius: var(--outer-border-radius); background: radial-gradient( circle at calc(var(--x) * 1px) calc(var(--y) * 1px), hsl( var(--hue-val, 240) calc(var(--hue-sat, 0) * 1.5%) calc(var(--hue-lum, 100) * 1.5%) / 0.5 ), transparent calc(var(--spotlight-size) * 1px) ); background-attachment: fixed; box-shadow: var(--shadow); } .card::after { --alpha: 0.5; content: ""; inset: 0; position: absolute; z-index: -1; border-radius: var(--outer-border-radius); background: radial-gradient( circle at calc(var(--x) * 1px) calc(var(--y) * 1px), hsl( var(--hue-val, 240) calc(var(--hue-sat, 0) * 1.5%) calc(var(--hue-lum, 100) * 1%) / 0.5 ), transparent calc(var(--spotlight-size) * 1px) ); background-attachment: fixed; filter: blur(1.5rem); } .card-heading { display: flex; flex-direction: column; gap: 30px; } .card-title { font-weight: 600; font-size: 14px; font-color: silver; } .card-subtitle { display: flex; flex-direction: column; gap: 30px; } .card-price { display: flex; gap: 4px; align-items: flex-start; font-weight: 600; font-size: 3rem; } .price { line-height: 0.9; } .currency { font-size: 1.5rem; font-weight: 500; } .card-content { padding-top: 20px; } .benefits-list { padding: 0; margin: 0; list-style: none; } .benefits-list li { font-size: 0.85rem; display: flex; align-items: center; gap: 8px; } .separator { border: none; margin: 12px; border-bottom: 1px solid rgba(255 255 255 / 0.1); width: 90%; } .card button { --alpha: calc(var(--button-active, 0) * 0.9); border: none; color: lightgrey; padding: 8px; border-radius: 30px; border: 1px solid rgba(255 255 255 / 0.2); box-shadow: 0 2px 10px black; background: radial-gradient( circle at calc(var(--x) * 1px) calc(var(--y) * 1px), hsl(var(--hue-val, 240) 50% 50% / var(--alpha)) ), var(--bg); background-attachment: fixed; cursor: pointer; } .card button:hover { --button-active: 1; } .badge { position: absolute; right: 1rem; top: 1rem; font-size: 0.75rem; border: 1px solid rgba(255 255 255 / 0.2); padding: 4px 10px; border-radius: 30px; background: linear-gradient( 150deg, rgba(255 255 255 / 0.1) 30%, rgba(255 255 255 / 0.2) ); pointer-events: none; } .card-2 .card-title { color: hsl(50 60% 50%); } } ``` -------------------------------- ### Lightswind UI CSS Variables Source: https://github.com/codewithmuhilan/lightswind-ui-library/blob/Master/README.md Customize your application's theme by modifying these CSS variables. Includes definitions for light and dark modes. ```css :root { --primarylw: #173eff; /* Main Brand Color */ --primarylw-2: #3758f9; /* Secondary/Hover Color */ --darklw: #11131B; /* Dark Theme Base */ --background: 0 0% 100%; --foreground: 0 0% 0%; --radius: 0.5rem; } .dark { --background: 0 0% 0%; --foreground: 0 0% 100%; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.