设置面板

New

偏好设置表单组件族:带发丝分隔行的带标题设置分组、文字自动反差的十六进制颜色输入胶囊、文本框、预设选择按钮,以及头部幽灵操作按钮。

Light theme
Accent color
Background
UI font
Translucent sidebar
Let the desktop tint the sidebar
Contrast
60

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/settings-panel

API 参考

SettingsGroup

variant?
"card" | "quiet"

Card keeps the preference shell; quiet becomes a flat hairline group.

card
title?
ReactNode
actions?
ReactNode

Header-right slot, e.g. a `SettingsGhostButton` plus a `SettingsSelectButton`.

className?
string

SettingsRow

label
ReactNode
description?
ReactNode

Muted one-liner rendered under `label`.

className?
string
children?
ReactNode

Trailing control slot, e.g. a `SettingsColorField` or a `Switch`.

SettingsColorField

value
string

Current color as `#RRGGBB` (or `#RGB`); the pill background and text contrast follow it.

onChange?
((hex: string) => void)
aria-label?
string
className?
string

SettingsTextField

value
string
onChange?
((next: string) => void)
placeholder?
string
aria-label?
string
className?
string

SettingsSelectButton

icon?
ReactNode

14px leading icon.

onClick?
(() => void)
className?
string
aria-label?
string

SettingsGhostButton

onClick?
(() => void)
className?
string

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.