# JSStyle

## Properties Summarized

| Type                                                     | Name          | Summary                           |
| -------------------------------------------------------- | ------------- | --------------------------------- |
| [String](/reference/servoycore/dev-api/js-lib/string.md) | [text](#text) | The textual content of the style. |

## Methods Summarized

| Type                                                      | Name                  | Summary                              |
| --------------------------------------------------------- | --------------------- | ------------------------------------ |
| [String](/reference/servoycore/dev-api/js-lib/string.md)  | [getName()](#getname) | Gets the name of the style.          |
| [UUID](/reference/servoycore/dev-api/application/uuid.md) | [getUUID()](#getuuid) | Returns the UUID of the style object |

## Properties Detailed

### text

The textual content of the style.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var st = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
st.text = st.text + 'field { background-color: blue; }';
form.styleName = 'myStyle';
application.output('Style name is: ' + st.getName());
```

## Methods Detailed

### getName()

Gets the name of the style.

**Returns:** [String](/reference/servoycore/dev-api/js-lib/string.md) A String holding the name of the style.

**Sample**

```js
var st = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
st.text = st.text + 'field { background-color: blue; }';
form.styleName = 'myStyle';
application.output('Style name is: ' + st.getName());
```

### getUUID()

Returns the UUID of the style object

**Returns:** [UUID](/reference/servoycore/dev-api/application/uuid.md)

**Sample**

```js
var st = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
application.output(st.getUUID().toString());
```


---

# 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/servoycore/dev-api/solutionmodel/jsstyle.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.
