# Data 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)

DataLabel is a label component that can show dynamic text and (optionally) an image.

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

## Properties

### dataProviderID

The column or variable to provide the data for this label. Type: [Dataprovider](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)

***

### enabled

Whether the component is enabled or not; blocks onAction, onDoubleClick, onRightClick events. Type: [Enabled](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### format

A format to format the data shown Type: [Format](/reference/servoy-developer/component_and_service_property_types.md#format)

***

### 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)

***

### showAs

Option whether label text (coming from dataprovider) 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

CSS style class for 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 of the form Type: [Tabseq](/reference/servoy-developer/component_and_service_property_types.md#tabseq)

***

### toolTipText

Tooltip text shown when hovering over the component (i18n is 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)

***

### valuelistID

The value list which is used to get a display value for the actual columns real value like id -> name Type: [Valuelist](/reference/servoy-developer/component_and_service_property_types.md#valuelist)

***

### visible

Whether the label 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, mouse coordinates
> * {[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/datalabel.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.
