# Conditional formatting based on cell value

In the Table, you can highlight certain values based on a specific condition by referencing the self `{{value}}`. Here are a few examples:point\_down:

## Highlighting cells in different colors

Let's say you have a list of customers and you want to monitor their state depending on the credit limit amount. You can highlight the limits which are less than 90k in red to easily identify the customers at risk.\
To do so, you need to open the column's *View settings* and specify the following condition in the *Color* field: `{{value >= 90000 ? 'success' : 'danger'}}`.

<figure><img src="/files/VkG5gRtzvWRZS0xTpfrk" alt=""><figcaption></figcaption></figure>

## Displaying emojis based on the value

Another use case is to display emojis in the table which stand for, for example, customer satisfaction rate. Let's say from the customer survey you got a number of points but instead of plain numbers you can display emojis for easier processing and analytics.

As an example, we'll use the following:

* 😔 - responses with less than 20 points
* 🙂 - neutral, 20-70 points
* 😍 - more than 70 points

Now, to map numeric values to corresponding emojis, you need to open the column's settings and first change the field type from Number to *String*. Then, you need to scroll down to the *View settings* section and specify the following code in the *Mapper* field:

`{{value < 20 ? '😔' : value >= 20 && value < 70 ? '🙂' : value >= 70 ? '😍' : ''}}`

<figure><img src="/files/pieg18Rwx2dIbj90HCwi" alt=""><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.uibakery.io/reference/working-with-components/table/more-ways-to-use-the-component/conditional-formatting-based-on-cell-value.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.
