使用可选的按钮和图标插槽捕获用户输入。
¥API Reference
¥Root
插槽和输入部分分组。此组件基于 div
元素并支持 常用边距属性。
¥Groups Slot and Input parts. This component is based on the div
element and supports common margin props.
¥Slot
包含与输入框关联的图标或按钮。
¥Contains icons or buttons associated with an Input.
¥Examples
¥Size
使用 size
属性控制大小。
¥Use the size
prop to control the size.
在编写带有按钮的文本字段时,使用匹配的组件大小。但是,请勿将尺寸为 1 的输入框与按钮一起使用 - 在此尺寸下,没有足够的垂直空间来嵌套其他交互元素。
¥Use matching component sizes when composing Text Field with buttons. However, don’t use size 1 inputs with buttons—at this size, there is not enough vertical space to nest other interactive elements.
¥Variant
使用 variant
属性控制视觉样式。
¥Use the variant
prop to control the visual style.
¥Color
使用 color
属性指定特定的 color。
¥Use the color
prop to assign a specific color.
¥Radius
使用 radius
属性指定特定的圆角值。
¥Use the radius
prop to assign a specific radius value.