# Spinner

(part of package '[Servoy Extra Components](/reference/servoyextensions/packages/ui-component-packages/servoy-extra-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)

A component that provides a spinner input for numeric values.

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

## Properties

### dataProviderID

Bound data provider identifier for the spinner value. Type: [Dataprovider](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)

***

### displaysTags

Indicates whether display tags are enabled. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)

***

### editable

Indicates whether the spinner is editable. Type: [Protected](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### enabled

Indicates whether the spinner is enabled for user interaction. Type: [Enabled](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### format

Format string used to display and parse the spinner value. Type: [Format](/reference/servoy-developer/component_and_service_property_types.md#format)

***

### placeholderText

Placeholder text displayed when no value is present. Type: [Tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)

***

### readOnly

Indicates whether the spinner is read-only. Type: [ReadOnly](/reference/servoy-developer/component_and_service_property_types.md#protected)

***

### responsiveHeight

Minimum height of the spinner, set only in responsive forms. Type: [Number](/reference/servoycore/dev-api/js-lib/number.md) Default Value: 30

***

### styleClass

CSS style classes applied to the spinner component. Type: [Styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)

***

### tabSeq

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

***

### text

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

***

### toolTipText

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

***

### valuelistID

Identifier for the value list used by the spinner. Type: [Valuelist](/reference/servoy-developer/component_and_service_property_types.md#valuelist)

***

### visible

Indicates whether the spinner is visible. Type: [Visible](/reference/servoy-developer/component_and_service_property_types.md#visible)

***

## Events

### onActionMethodID(event)

Fired when the spinner action is triggered.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the action event.

***

### onDataChangeMethodID(oldValue,newValue,event)

Fired when the spinner value changes.

**Parameters:**

> * {[${dataproviderType}](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)} oldValue The previous value from the data provider.
> * {[${dataproviderType}](/reference/servoy-developer/component_and_service_property_types.md#dataprovider)} newValue The new value to be set in the data provider.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object associated with the data change.

**Returns:** {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)}

***

### onFocusGainedMethodID(event)

Fired when the spinner gains focus.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the focus gained event.

***

### onFocusLostMethodID(event)

Fired when the spinner loses focus.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the focus lost event.

***

### onRightClickMethodID(event)

Fired when the spinner is right-clicked.

**Parameters:**

> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} event The event object containing details about the right-click event.

***

## API

### requestFocus(mustExecuteOnFocusGainedMethod)

Request the focus to this field.

**Example:**

```js
myElement.requestFocus();
```

**Parameters:**

> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[mustExecuteOnFocusGainedMethod] If false will not execute the onFocusGained method; the default value is true

***

***


---

# 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/input-control/spinner.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.
