# Battery

The **battery** widget can be used to display the battery level of a device, typically as a **percentage**, **Volts**, or **mVolts**. By monitoring the battery level, you can better understand how long you can continue to use the device before needing to replace or recharge the batteries.

In the **Widget options** modal box, enter a **name** as the label for your widget in the **Name** text box, and select the **data field** bound with the battery voltage from the **Data field** drop-down list.

To add a **color** to the **background** of the widget, click on the **Background color** box and choose a color from the **color picker**.

Click on the **Save** button.

<figure><img src="/files/GR3Es1pqJSFKDBjmeSsK" alt="" width="328"><figcaption></figcaption></figure>

The resulting **Battery** widget looks something like this:

<figure><img src="/files/4KktUaxZpTFrCbvL610K" alt="" width="299"><figcaption></figcaption></figure>


---

# 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.widgelix.com/get-started/widgets/battery.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.
