Field & Input Group

字段、标签、描述、错误信息以及带附加项的输入组——由系统统一样式的原生输入框。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

Shown to people you share notes with.

https://
GB
Notify me about

导入

ts
import {
  SoneFieldContentDirective,
  SoneFieldDescriptionDirective,
  SoneFieldDirective,
  SoneFieldErrorDirective,
  SoneFieldGroupDirective,
  SoneFieldLabelDirective,
  SoneFieldLabelOptionalDirective,
  SoneFieldLegendDirective,
  SoneFieldSeparatorContentDirective,
  SoneFieldSeparatorDirective,
  SoneFieldSetDirective,
  SoneFieldTitleDirective,
  SoneInputGroupAddonDirective,
  SoneInputGroupControlDirective,
  SoneInputGroupDirective,
  SoneInputGroupTextDirective,
  SoneLabelDirective,
} from "@surface-one/angular/input";

API 参考

SoneFieldContentDirective指令

选择器
[soneFieldContent]

SoneFieldDescriptionDirective指令

选择器
[soneFieldDescription]

SoneFieldDirective指令

选择器
[soneField]
输入
名称类型 默认值
orientationFieldOrientation"vertical"
invalidbooleanfalse
disabledbooleanfalse

SoneFieldErrorDirective指令

选择器
[soneFieldError]

SoneFieldGroupDirective指令

选择器
[soneFieldGroup]
输入
名称类型 默认值
variant"default" | "choices""default"

SoneFieldLabelDirective指令

选择器
[soneFieldLabel]

SoneFieldLabelOptionalDirective指令

`[soneFieldLabelOptional]` — the quiet "Optional" marker inside a field label: `<label soneFieldLabel>Notes <span soneFieldLabelOptional>Optional</span></label>`.

选择器
[soneFieldLabelOptional]

SoneFieldLegendDirective指令

选择器
legend[soneFieldLegend]
输入
名称类型 默认值
variant"legend" | "label""legend"

SoneFieldSeparatorContentDirective指令

选择器
[soneFieldSeparatorContent]

SoneFieldSeparatorDirective指令

选择器
[soneFieldSeparator]

SoneFieldSetDirective指令

选择器
fieldset[soneFieldSet]

SoneFieldTitleDirective指令

选择器
[soneFieldTitle]

SoneInputGroupAddonDirective指令

选择器
[soneInputGroupAddon]
输入
名称类型 默认值
alignInputGroupAddonAlign"inline-start"

SoneInputGroupControlDirective指令

选择器
input[soneInputGroupInput], textarea[soneInputGroupTextarea]

SoneInputGroupDirective指令

选择器
[soneInputGroup]
输入
名称类型 默认值
invalidbooleanfalse
disabledbooleanfalse
fill

Take the free space of a flex row (`flex: 1`, may shrink) — a search box beside buttons.

booleanfalse
variant

`filled`: a grey fill instead of a border (the focus ring stays). A filled field has no 3:1 boundary of its own, so keep it to search boxes that a leading search glyph and a placeholder identify.

InputGroupVariant"default"

SoneInputGroupTextDirective指令

选择器
[soneInputGroupText]

SoneLabelDirective指令

选择器
label[soneLabel], span[soneLabel]