JGuang / JGuang UI
Components组件Base UIBase UI 组件

标签

为表单控件提供可访问的文本标签。

中文模式已适配导航、标题、简介、目录与常用章节名称。翻译状态:部分完成;技术正文目前仍为英文。
Loading JGuang UI example…

For form fields, use the Field component which includes built-in label, description, and error handling.

安装

Command

Manual

Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.

安装以下依赖:

npm install @base-ui/react

将以下代码复制到你的项目中。

View complete source: components/ui/label.tsx

根据项目配置更新导入路径。

用法

import { Label } from "@/components/ui/label"
<Label htmlFor="email">Your email address</Label>

Label in Field

For form fields, use the Field component which includes built-in FieldLabel, FieldDescription, and FieldError components.

<Field>
  <FieldLabel htmlFor="email">Your email address</FieldLabel>
  <Input id="email" />
</Field>
Loading JGuang UI example…

从右到左布局

To enable RTL support in JGuang UI, see the RTL configuration guide.

Loading JGuang UI example…

API 参考

See the Base UI Label documentation for more information.

来源: components/base/label.mdx

JGuang UI 技术文档。

On this page