Skip to main content

FormItem

<ui5-form-item> | Since 2.0.0
info

This component is availabe since 2.0 under an experimental flag and its API and behaviour are subject to change.

The FormItem (ui5-form-item) represents pair of a label and one or more components (text or text fields), associated to it.

Usage​

The FormItem is being used in FormGroup (ui5-form-group) or directly in Form (ui5-form).

ES6 Module Import​

  • import @ui5/webcomponents/dist/FormItem.js";

Properties​

columnSpan​

DescriptionDefines the column span of the component, e.g how many columns the component should span to.
Note: The column span should be a number between 1 and the available columns of the FormGroup (when items are placed in a group) or the Form. The available columns can be affected by the FormGroup#columnSpan and/or the Form#layout. A number bigger than the available columns won't take effect.
Typenumber | undefined
Defaultundefined

Slots​

labelContent​

DescriptionDefines the label of the component.
TypeArray<HTMLElement>

default​

DescriptionDefines the content of the component, associated to labelContent.
TypeArray<HTMLElement>

Events​

No events available for this component.

Methods​

No methods available for this component.

CSS Parts​

NameDescription
layoutUsed to style the parent element of the label and content parts.
labelUsed to style the label part of the form item.
contentUsed to style the content part of the form item.