# Form components: Action components

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

## Contents

- [Button](#button) — `com.install4j.runtime.beans.formcomponents.ButtonComponent`
- [Dark mode switcher](#dark-mode-switcher) — `com.install4j.runtime.beans.formcomponents.DarkModeSwitcherComponent`
- [Hyperlink action label](#hyperlink-action-label) — `com.install4j.runtime.beans.formcomponents.HyperlinkActionLabelComponent`
- [Hyperlink URL label](#hyperlink-url-label) — `com.install4j.runtime.beans.formcomponents.HyperlinkLabelComponent`

---

### Button
- **Class:** `com.install4j.runtime.beans.formcomponents.ButtonComponent`
- **Category:** Action components
- **Multiple instances:** yes

A standard button with an optional leading label. When the user clicks on the button, an action script is executed.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `labelText` — Text | String | Label | — | The text of the label. Can be empty. To configure a keyboard shortcut, prefix the mnemonic character in the label text with &, e.g."&User". The prefixed character will be underlined and the platform-specific keyboard shortcut (e.g. ALT+[character] on Windows) will allow the user to quickly navigate to this form component with the keyboard. |
| `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>. |
| `requestFocus` — Request focus | boolean | User input | — | If selected, the form component will request the focus after the form is activated. If you have multiple form components in a single form that have this property selected, the result is undefined. |
| `buttonText` — Button text | String | Button | — | The text that is displayed on the button. Can be empty if the button icon is set. |
| `buttonIconFile` — Button icon | ExternalFile suffixes=[png, gif] | Button | — | The icon displayed on the button. Can be empty if the button text is set.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. |
| `widgetStyleId` — Button style | String [context=widgetStyleIdOrCustom] | Button | — | 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 | ButtonWidgetStyle | Button | `widgetStyleId` (custom condition) | widgetStyle |
| `configurableActionType` — Action type | [ConfigurableActionType](enums.md#configurableactiontype) | Button | — | The type of the action that should be executed by the button is clicked. You can either choose to configure a single script or an entire list of actions. |
| `actionScript` — Action script | ScriptProperty → void | Button | `configurableActionType`=Script | The script that is executed when the button is clicked by the user. The return type is void. |
| `actionList` — Action list | ActionList (action list) | Button | `configurableActionType`=Action list | A list of actions that is executed when the button is clicked by the user. |

### Dark mode switcher
- **Class:** `com.install4j.runtime.beans.formcomponents.DarkModeSwitcherComponent`
- **Category:** Action components
- **Multiple instances:** yes

A button that switches between dark and light mode. If the current look and feel does not support switching between dark and light mode, the button is invisible.

| Property | Type | Category | Visible when | Description |
|---|---|---|---|---|
| `iconOnly` — Only show an icon | boolean | Configuration | — | Only show an icon and no text on the button. If selected, the button will have a flat appearance without any border. |

### Hyperlink action label
- **Class:** `com.install4j.runtime.beans.formcomponents.HyperlinkActionLabelComponent`
- **Category:** Action components
- **Multiple instances:** yes

A label that displays a hyperlink. When the user clicks on the hyperlink, an action script is executed

| 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>. |
| `hyperlinkText` — Hyperlink text | String | Configuration | — | The text that is displayed on the hyperlink label. |
| `widgetStyleId` — Hyperlink widget style | String [context=widgetStyleIdOrCustom] | Configuration | — | 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 | HyperlinkWidgetStyle | Configuration | `widgetStyleId` (custom condition) | widgetStyle |
| `configurableActionType` — Action type | [ConfigurableActionType](enums.md#configurableactiontype) | Configuration | — | The type of the action that should be executed by the button is clicked. You can either choose to configure a single script or an entire list of actions. |
| `actionScript` — Action script | ScriptProperty → void | Configuration | `configurableActionType`=Script | The script that is executed when the button is clicked by the user. The return type is void. |
| `actionList` — Action list | ActionList (action list) | Configuration | `configurableActionType`=Action list | A list of actions that is executed when the button is clicked by the user. |

### Hyperlink URL label
- **Class:** `com.install4j.runtime.beans.formcomponents.HyperlinkLabelComponent`
- **Category:** Action components
- **Multiple instances:** yes

A label that displays a hyperlink. When the user clicks on the hyperlink, the appropriate action is performed, depending on the protocol of the URL.

| 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>. |
| `hyperlinkText` — Hyperlink text | String | Configuration | — | The text that is displayed on the hyperlink label. |
| `url` — URL | String | Configuration | — | The URL for the hyperlink. For example https://www.ej-technologies.com |
| `widgetStyleId` — Hyperlink widget style | String [context=widgetStyleIdOrCustom] | Configuration | — | 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 | HyperlinkWidgetStyle | Configuration | `widgetStyleId` (custom condition) | widgetStyle |

