# Form components: Labels and spacers

install4j BeanInfo catalog. Each entry below documents a bean class that can appear inside a `<serializedBean>` element in an install4j project file.

## Contents

- [Horizontal separator](#horizontal-separator) — `com.install4j.runtime.beans.formcomponents.SeparatorComponent`
- [Key value pair label](#key-value-pair-label) — `com.install4j.runtime.beans.formcomponents.KeyValuePairComponent`
- [Label](#label) — `com.install4j.runtime.beans.formcomponents.LabelComponent`
- [Leading label](#leading-label) — `com.install4j.runtime.beans.formcomponents.SimpleLeadingLabelComponent`
- [Multi-line HTML label](#multi-line-html-label) — `com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent`
- [Multi-line label](#multi-line-label) — `com.install4j.runtime.beans.formcomponents.MultilineLabelComponent`
- [Spring](#spring) — `com.install4j.runtime.beans.formcomponents.SpringComponent`
- [Vertical spacer](#vertical-spacer) — `com.install4j.runtime.beans.formcomponents.SpacerComponent`

---

### Horizontal separator
- **Class:** `com.install4j.runtime.beans.formcomponents.SeparatorComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

A horizontal separator with an optional label.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `specialTitleFont` — Use special title font | boolean | Label | — | If selected, a special font and color are used for the separator label. The actual font depends on the look and feel. This setting overrides all other font settings for the label. |
| `enabledTitleText` — Show enabled text | boolean | Label | — | If selected, the title text is shown like for an enabled title, otherwise the title text is shown like for a disabled label. |

### Key value pair label
- **Class:** `com.install4j.runtime.beans.formcomponents.KeyValuePairComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

A pair of labels. The first ('key') label aligns with other leading labels on the form, the second ('value') label consumes the remaining horizontal space,

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Key Label | — | The text of the key label. Can be empty. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Key Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Key Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Key Label | — | An image file with an icon for the key label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `helpText` — Help text | String [context=html] | Help | — | If a text is entered into this property, a tooltip label with a help icon will be created on the right side of the form component that will display the help text when the user hovers with the mouse above the icon. The text can be plain text or HTML. For multi-line labels, use HTML like this: <html>This is line one<br>This is line two</tt></html>. |
| `valueLabelText` — Text | String | Value Label | — | The text of the value label. Can be empty. |
| `valueLabelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Value Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `valueLabelWidgetStyle` — valueLabelWidgetStyle | LabelWidgetStyle | Value Label | `valueLabelWidgetStyleId` (custom condition) | valueLabelWidgetStyle |
| `valueLabelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Value Label | — | An image file with an icon for the value label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `ellipsizeFilePaths` — Ellipsize file paths | boolean | Value Label | — | If the label contains file paths that don't fit in the available horizontal space, the file paths are ellipsized in the middle.If you select this property, the label will use all available horizontal space. |

### Label
- **Class:** `com.install4j.runtime.beans.formcomponents.LabelComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

A single label. It is left-aligned with leading labels from other form components and extends beyond other leading labels.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `emptyLeadingLabel` — Add empty leading label | boolean | Label | — | If selected, the label will not be aligned at the very left, but it will start after the leading labels of other form components in the same vertical group. |
| `ellipsizeFilePaths` — Ellipsize file paths | boolean | Label | — | If the label contains file paths that don't fit in the available horizontal space, the file paths are ellipsized in the middle.If you select this property, the label will use all available horizontal space. |

### Leading label
- **Class:** `com.install4j.runtime.beans.formcomponents.SimpleLeadingLabelComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

A form component that only has a leading label and no central component. This can also be used to create standalone help tooltips.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle | Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `labelIconFile` — Icon | ExternalFile suffixes=[png, gif] | Label | — | An image file with an icon for the label label. Can be empty.To add a high-resolution image, create a file with double the resolution and an additional @2x after the name (e.g. image.png and image@2x.png) next to the selected image. To use different images in dark mode, add files with an additional _dark suffix (e.g. image_dark.png and image@2x_dark.png) The install4j runtime JAR file i4jruntime.jar contains a number of image files that you can reference here by prefixing the icon file name with "icon:". For example, icon:lock_open_32.png loads a 32x32 icon showing an open lock. |
| `helpText` — Help text | String [context=html] | Help | — | If a text is entered into this property, a tooltip label with a help icon will be created on the right side of the form component that will display the help text when the user hovers with the mouse above the icon. The text can be plain text or HTML. For multi-line labels, use HTML like this: <html>This is line one<br>This is line two</tt></html>. |

### Multi-line HTML label
- **Class:** `com.install4j.runtime.beans.formcomponents.MultilineHtmlLabelComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

A multi-line label that wraps text as needed and displays simple HTML. In particular, you can include HTML links that open a browser.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelHtml` — HTML | String [context=html] | Label | — | The HTML for the label. The value should start with <html>, otherwise the plain text will be displayed in the preview. You can include HTML links that open a browser when clicked by the user. URLs in <a href="..."> links should start with http://, https:// or file://. |
| `makeTextSelectable` — Make text selectable | boolean | Label | — | If selected, the user will be able to select parts of the label text with the mouse and use the copy keyboard action to copy the selection to the clipboard. |
| `widgetStyleId` — Widget style | String [context=widgetStyleIdOrCustom] | Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `widgetStyle` — widgetStyle | LabelWidgetStyle | Label | `widgetStyleId` (custom condition) | widgetStyle |

### Multi-line label
- **Class:** `com.install4j.runtime.beans.formcomponents.MultilineLabelComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

A multi-line label that wraps text as needed.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String [context=multiline] | Label | — | The text of the label. |
| `hideIfBlank` — Hide if text is blank | boolean [context=multiline] | Label | — | If the text is blank, hide the form component when the form is activated. In that case you can also leave the "Text" property empty. |
| `labelWidgetStyleId` — Label widget style | String [context=widgetStyleIdOrCustom] |  Label | — | If no explicit widget style is set, the widget style from the active screen style is used.You can also set an explicit custom style for this widget. |
| `labelWidgetStyle` — labelWidgetStyle | LabelWidgetStyle |  Label | `labelWidgetStyleId` (custom condition) | labelWidgetStyle |
| `makeTextSelectable` — Make text selectable | boolean | Label | — | If selected, the user will be able to select parts of the label text with the mouse and use the copy keyboard action to copy the selection to the clipboard. |

### Spring
- **Class:** `com.install4j.runtime.beans.formcomponents.SpringComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

An invisible spring that can be used in horizontal and vertical layout groups to push subsequent components to the right or to the bottom

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `axisType` — Axis | [AxisType](enums.md#axistype) | Configuration | — | The direction along which the spring will push subsequent components. In a horizontal layout group, use the "Horizontal" setting, in a vertical layout group, use the "Vertical" setting. |

### Vertical spacer
- **Class:** `com.install4j.runtime.beans.formcomponents.SpacerComponent`
- **Category:** Labels and spacers
- **Multiple instances:** yes

An invisible vertical spacer of configurable height.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `height` — Spacer height | int | Configuration | — | The height of the spacer in pixels. The spacer itself is invisible. |

