π View Storybook | π Changelog
Lumen is a comprehensive design system that provides consistent UI components for both web and mobile applications.
- Install the packages and their peer dependencies:
# Install the UI Kit and required peer dependencies
npm install @ledgerhq/lumen-ui-react @ledgerhq/lumen-design-core clsx tailwind-merge class-variance-authority- Configure Tailwind:
import type { Config } from 'tailwindcss';
import { ledgerLivePreset } from '@ledgerhq/lumen-design-core';
const config = {
content: [
'./src/**/*.{js,ts,jsx,tsx}', // Your project's files
'./node_modules/@ledgerhq/lumen-ui-react/dist/lib/**/*.{js,ts,jsx,tsx}', // Ledger UI Kit components
],
presets: [ledgerLivePreset], // the installed tailwind preset
} satisfies Config;
export default config;- Use components:
# Install peer dependency related to the button component
npm install @radix-ui/react-slot@radix-ui/react-slot: This dependency is used internally by the Button component to enable flexible composition patterns. It allows the Button to merge its props with child elements when needed.
import { Button } from '@ledgerhq/lumen-ui-react';
function App() {
return <Button appearance='accent'>Get Started</Button>;
}- π Full User Guide - Comprehensive guide for using Lumen
- π¨ Design Guidelines - Learn about our design tokens and principles
- π§© Component Library - Explore available components
- βοΈ Configuration Guide - Advanced configuration options
Lumen includes AI rules to help assistants (Cursor, Claude, VS Code Copilot, etc.) suggest correct usage patterns.
For Cursor users, add to your .cursorrules:
@node_modules/@ledgerhq/lumen-ui-react/ai-rules/RULES.md
For other AI tools, see our AI Rules README.
The rules help with:
- β Correct import paths and package usage
- β Lumen design tokens instead of Tailwind defaults
- β Proper Tailwind configuration
- β Figma-to-code token mapping
Lumen is built with Nx, supporting both React and React Native development. Here's how to get started with development:
- Clone and install dependencies:
npm install --legacy-peer-deps- Start development environment:
# Start React Storybook
npx nx run @ledgerhq/lumen-ui-react:serve:storybook
# Build all libraries
npx nx run-many --target=build --alllumen/
βββ libs/
β βββ ui-core/ # Shared utilities and types
β βββ ui-react/ # React components
β βββ ui-rnative/ # React Native components
β βββ design-core/ # Design tokens and themes
β βββ utils-shared/ # Shared utilities
βββ apps/
βββ app-sandbox-rnative # Demo React-Native application
βββ app-sandbox-react # Demo React application
- Create a new branch from main
- Make your changes
- Add tests and stories
- Submit a pull request
- π§ Development Guide - Detailed development setup and guidelines
- π Coding Standards - Our coding conventions
- π§ͺ Testing Guide - How to write and run tests
- π Documentation Guide - How to document your changes
This project is licensed under the MIT License - see the LICENSE.md file for details.
Built with β€οΈ by the LDS Team