# Label

(part of package '[Bootstrap Components](/reference/servoyextensions/packages/ui-component-packages/bootstrap-components.md)')\
Extends designtime/SolutionModel: [JSWebComponent](/reference/servoycore/dev-api/solutionmodel/jswebcomponent.md)\
Extends runtime: [RuntimeWebComponent](/reference/servoycore/dev-api/forms/runtimeform/elements/runtimewebcomponent.md)

This is a reference page; many components have detailed usage guides [here](https://docs.servoy.com/guides/develop/application-design/ui-components).

## Properties

### enabled

Label is a label component that can show dynamic text and (optionally) an image. Type: [Enabled](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### imageStyleClass

An icon style class property (glyphicon, material design or Font Awesome).\
Example 'fas fa-search'\
If you want to use Font Awesome classes you need to enable the Font Awesome service from the Servoy Package Manager. Type: [String](/reference/servoycore/dev-api/js-lib/string.md)

***

### labelFor

Name of an input field - 'for' html attribute will be filled in. Type: [Labelfor](/reference/servoy-developer/component_and_service_property_types.md#labelfor)

***

### showAs

Option whether label text is shown as plain text, sanitized html or trusted html (as is). Inner html elements events can be identified using data-target attribute. Type: [String](/reference/servoycore/dev-api/js-lib/string.md) Default Value: "html"

***

### styleClass

Set the styleclasses that should be applied at to this component Type: [Styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass) Default Value: "default-align"

***

### styleClassExpression

A column or calculation that provides the CSS style class for this component Type: [Dataprovider](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)

***

### tabSeq

Tab sequence index for keyboard navigation. Type: [Tabseq](/reference/servoy-developer/component_and_service_property_types.md#tabseq)

***

### text

The text content displayed by the label (i18n supported). Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)

***

### toolTipText

Tooltip text displayed when hovering over the label (i18n supported). Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)

***

### trailingImageStyleClass

An icon style class property (glyphicon, material design or Font Awesome).\
Example 'fas fa-search'\
If you want to use Font Awesome classes you need to enable the Font Awesome service from the Servoy Package Manager. Type: [String](/reference/servoycore/dev-api/js-lib/string.md)

***

### variant

Sets the variant of this button, this sets a certain set of styleclasses at runtime for which this variant is configured for Type: [Variant](/reference/servoy-developer/component_and_service_property_types.md#variant)

***

### visible

Whether the button is visible or not Type: [Visible](/reference/servoy-developer/component_and_service_property_types.md#visible)

***

## Events

### onActionMethodID(event,dataTarget)

Click event. dataTarget parameter is used to identify inner html elements (by their data-target attribute)

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the click event e.g. target element, mouse coordinates
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} dataTarget The identifier for inner html elements, identified via the data-target attribute

***

### onDoubleClickMethodID(event,dataTarget)

DoubleClick event. dataTarget parameter is used to identify inner html elements (by their data-target attribute)

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the double-click event e.g. target element, click timing
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} dataTarget The identifier for inner html elements, identified via the data-target attribute

***

### onRightClickMethodID(event,dataTarget)

RightClick event. dataTarget parameter is used to identify inner html elements (by their data-target attribute)

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the right-click event e.g. target element, context menu trigger
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} dataTarget The identifier for inner html elements, identified via the data-target attribute

***

## API

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/reference/servoyextensions/ui-components/buttons-and-text/label.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
