Field

Field container component - integrates labels, inputs, descriptions and error messages

案例展示

Field 组件在实际场景中的使用示例

基础字段

必填字段

We won't share your email

带帮助文本

At least 8 characters, including letters and numbers

错误状态

Please enter a valid email address

完整表单示例

Used for notifications

Optional

Regular 形状

使用标准圆角的字段样式

标准圆角表单

Your organization or business name

内联标签样式

Brief description for your profile

覆盖样式

通过 className 自定义字段外观

紧凑样式

大号样式

We'll use this to send you updates

带背景色的字段

Choose a unique name for your project

This tag will be highlighted

带前缀后缀的字段

https://
$USD
@

Your Twitter or Instagram handle

错误状态变体

不同风格的错误提示

Please enter a valid email address

Password must be at least 8 characters

This username is already taken

Please enter a valid phone number

状态

Field 组件的不同状态

Normal
Required

Help text

With Description

Error message

Error

组件结构

Field 由多个子组件组成

Field

Container

FieldLabel

Label with required indicator

FieldDescription

Helper text

FieldError

Error message