← Open Source
lobehub

lobe-ui

🍭 Lobe UI - an open-source UI component library for building AIGC web apps

AI EngineeringBuild agent UITypeScript
Open on GitHub
Momentum
+3stars in 24 hours+0.1%
2.22k
Stars
275
Forks
+6
This week
45
Contributors
Created 2023-05-21 Β· Updated 2026-10-05 Β· #2092 today
Top developers
README

Lobe UI

Lobe UI is an open-source UI component library for building AIGC web apps

Documents Β· Changelog Β· Report Bug Β· Request Feature

Table of contents

TOC

πŸ“¦ Installation

[!IMPORTANT]
This package is ESM only.

To install Lobe UI, run the following command:

$ pnpm add @lobehub/ui

Compile with NextJS

[!NOTE]
By work correct with nextjs page router SSR, add transpilePackages: ['@lobehub/ui'] to next.config.js. For example:

// next.config.js
const nextConfig = {
  // ...other config

  transpilePackages: ['@lobehub/ui'],
};

🀯 Usage

[!NOTE]
The LobeUI components are developed based on Antd, fully compatible with Antd components, and it is recommended to use antd-style as the default css-in-js styling solution.

import { ThemeProvider, Button } from '@lobehub/ui';
import { Button } from 'antd';

export default () => (
  
    Hello AIGC
  
);

I18n

Use the i18n provider with resource bundles. Component texts props always take priority.

import { I18nProvider } from '@lobehub/ui';
import formMessages from '@lobehub/ui/i18n/resources/form';
import hotkeyMessages from '@lobehub/ui/i18n/resources/hotkey';


  
;

ConfigProvider (Motion)

You must pass a motion component via ConfigProvider, and ConfigProvider must wrap ThemeProvider β€” never the other way round. ThemeProvider renders the antd App that hosts the static notification / modal holders and reads the CDN config for its webfonts, so both need the contexts from ConfigProvider above them.

import { ConfigProvider, ThemeProvider } from '@lobehub/ui';
import { motion } from 'motion/react';

export default () => (
  
    
      
    
  
);

If your app uses LazyMotion, pass m:

import { ConfigProvider, ThemeProvider } from '@lobehub/ui';
import { LazyMotion, domAnimation } from 'motion/react';
import * as m from 'motion/react-m';

export default () => (
  
    
      
        
      
    
  
);

⌨️ Local Development

You can use Github Codespaces for online development:

Or clone it for local development:

$ git clone https://github.com/lobehub/lobe-ui.git
$ cd lobe-ui
$ pnpm install
$ pnpm start

🀝 Contributing

Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what you’re made of.

🩷 Sponsor

Every bit counts and your one-time donation sparkles in our galaxy of support! You're a shooting star, making a swift and bright impact on our journey. Thank you for believing in us – your generosity guides us toward our mission, one brilliant flash at a time.

πŸ”— Links

More Products

  • 🀯 Lobe Chat - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
  • πŸ…°οΈ Lobe Theme - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.
  • 🧸 Lobe Vidol - Experience the magic of virtual idol creation with Lobe Vidol, enjoy the elegance of our Exquisite UI Design, dance along using MMD Dance Support, and engage in Smooth Conversations.

Design Resources

Development Resources

  • 🎀 Lobe TTS - A high-quality & reliable TTS/STT library for Server and Browser
  • 🌏 Lobe i18n - Automation ai tool for the i18n (internationalization) translation process.

More Resources


πŸ“ License

Copyright Β© 2023 LobeHub.

This project is MIT licensed.