Components
Label 标签
与表单控件关联的无障碍标签,required 自动追加红色星号。
基础
for 绑定控件 id,点击聚焦。
<div class="flex items-center gap-3 max-w-xs">
<Label for="api-key" required>API Key</Label>
<Input id="api-key" v-model="key" class="flex-1" placeholder="rc_live_…" />
</div>API 参考
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
for | string | — | 关联控件 id。 |
required | boolean | false | 显示必填星号。 |