Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LedgerHQ/lumen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ledger Design System

A cross-platform design system for React and React Native applications

πŸ“š View Storybook | πŸ“‹ Changelog


πŸ‘©β€πŸ’» Using Lumen in Your Project

Lumen is a comprehensive design system that provides consistent UI components for both web and mobile applications.

Quick Start

  1. 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
  1. 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;
  1. 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>;
}

Learn More

πŸ€– AI Assistant Support

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

View the rules β†’


πŸ›  Contributing to Lumen

Lumen is built with Nx, supporting both React and React Native development. Here's how to get started with development:

Setup Development Environment

  1. Clone and install dependencies:
npm install --legacy-peer-deps
  1. Start development environment:
# Start React Storybook
npx nx run @ledgerhq/lumen-ui-react:serve:storybook

# Build all libraries
npx nx run-many --target=build --all

Project Structure

lumen/
β”œβ”€β”€ 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

Development Workflow

  1. Create a new branch from main
  2. Make your changes
  3. Add tests and stories
  4. Submit a pull request

Learn More About Contributing


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.


Built with ❀️ by the LDS Team