FieldSemantics API
import { Description, FieldError, ControlGroup, Fieldset } from '@editora/ui-react';
Description props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
for | string | |
htmlFor | string | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
tone | 'default' | 'brand' | 'success' | 'warning' | 'danger' | |
variant | 'default' | 'soft' | 'surface' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
FieldError props
| Prop | Type | Description |
|---|---|---|
active | boolean | |
children | React.ReactNode | |
for | string | |
htmlFor | string | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
variant | 'default' | 'soft' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
ControlGroup props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
density | 'default' | 'compact' | 'comfortable' | |
label | string | |
orientation | 'vertical' | 'horizontal' | |
variant | 'default' | 'soft' | 'surface' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Fieldset props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
density | 'default' | 'compact' | 'comfortable' | |
description | string | |
error | string | |
headless | boolean | |
invalid | boolean | |
legend | string | |
orientation | 'vertical' | 'horizontal' | |
required | boolean | |
shape | 'default' | 'square' | 'soft' | |
tone | 'default' | 'brand' | 'success' | 'warning' | 'danger' | |
variant | 'default' | 'surface' | 'outline' | 'soft' | 'contrast' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).