LobeChatLobeHub
UI
Components
Chat
Mobile
Awesome
Brand
Mdx
Color
Changelog
Ctrl K
General
ActionIcon
ActionIconGroup
Icon
FileTypeIcon
MaterialFileTypeIcon
Data Display
Avatar
Collapse
EmptyCard
FluentEmoji
Highlighter
Image
List
Markdown
Mermaid
Snippet
SortableList
Tag
Tooltip
Video
Data Entry
CodeEditor
ContextMenu
CopyButton
EditableText
EmojiPicker
Form
FormModal
Input
SearchBar
SelectWithImg
SliderWithInput
Swatches
ThemeSwitch
Feedback
Alert
Modal
Layout
DraggablePanel
Footer
Grid
Header
Layout
Navigation
Burger
SideNav
TabsNav
Toc
Theme
ConfigProvider
FontLoader
ThemeProvider

ThemeProvider

ThemeProvider is a component that provides a theme to all the child components.

import { ThemeProvider } from '@lobehub/ui';
NPM
UNPKG
BundlePhobia
PackagePhobia
Anvaka Graph
Source
Edit
Previous
FontLoader

Resources

Lobe UI-AIGC Components
Lobe Icon-AI / LLM Icon Collection
Lobe Charts-Modern Charts
Lobe TTS-TTS / STT Library

Community

Report Bug
Request Feature

Help

GitHub
Changelog

More Products

🤯 Lobe Chat-AI / LLM Chat Framework
🧸 Lobe Vidol-Virtual Idols for EveryOne
🅰️ Lobe Theme-Stable Diffusion Extension
🌐 Lobe i18n-AI i18next CLI
Copyright © 2022-2025
Made with 🤯 by LobeHub
LobeHub

Default

Custom Fonts

APIs

NameDescriptionTypeDefault
className--string--
customFontsWebfont loader css stringsstring[]--
customStylish--(theme:import("/node_modules/antd-style/lib/types/function").CustomStylishParams)=>{}--
customTheme--{neutralColor?:any;primaryColor?:any}--
customTokenCustom extra token(theme:import("/node_modules/antd-style/lib/types/function").CustomTokenParams)=>{}--
enableCustomFonts--boolean--
enableGlobalStyle--boolean--
style--{}--
children--ReactNode--
styled--{ThemeContext:(props:P)=>|ReactElement;ThemeProvider?:(props:P)=>|ReactElement}--
prefixCls--string--
theme直接传入 antd 主题,或者传入一个函数,根据当前的主题模式返回对应的主题ThemeConfig|GetAntdTheme--
getStaticInstance从 ThemeProvider 中获取静态方法的实例对象(instances:import("/node_modules/antd-style/lib/factories/createThemeProvider/type").StaticInstance)=>void--
staticInstanceConfig静态方法的入参{message?:object;notification?:object}--
appearance应用的展示外观主题,默认提供亮色和暗色两种,用户可以自行扩展string"light"
defaultAppearance--string--
onAppearanceChange--(appearance:string)=>void--
themeMode主题的展示模式,有三种配置:跟随系统、亮色、暗色 默认不开启自动模式,需要手动进行配置"light"|"dark"|"auto""light"
defaultThemeMode--"light"|"dark"|"auto"--
onThemeModeChange--(mode:import("/node_modules/antd-style/lib/types/appearance").ThemeMode)=>void--

Default Fonts

Hello World

Custom Fonts

Hello World