---
updatedAt: 2026-01-19T14:51:10.000Z
agentTools:
  projectIndex: https://docs.talkdesk.com/llms.txt
---

# Common Use Cases

The most common patterns in the Render View component

## Hyperlink

You can display a link on a card by using the [Render View component](https://docs.talkdesk.com/docs/render-view). See the code example below (Figure 1).

```html
<Text>MyURL</Text><Link href="https://www.talkdesk.com/">Click here</Link>
```

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/4aafe5e-Figure_8_-_Hyperlink_card_example.png",
        "Figure 8 - Hyperlink card example.png",
        1440
      ],
      "align": "center",
      "caption": "Figure 1 - Hyperlink card example"
    }
  ]
}
[/block]

## Displaying Data in a Table

In this example, there is an array of objects and the goal is to create a table interface to show those values (Figure 2).

```html
<Flex width="100%" height="100%" direction="column" alignX="start" padding="4">
    <Heading level="3">Order History</Heading>
    <table>
        <tr>
            {["Order Number", "Price", "Date"].map(label => (
                <th><Label>{label}</Label>
                    <Divider />
                </th>
            ))}
        </tr>
        {[
            { orderNumber: 'PT1234', price: '5000', date: '22/10/26' },
            { orderNumber: 'PT5678', price: '3000', date: '21/04/26' },
            { orderNumber: 'PT1659', price: '1000', date: '22/05/31' }
        ].map(order => (
            <tr>
                <td><Text>{order.orderNumber}</Text></td>
                <td><Text>{order.price}</Text></td>
                <td><Text>{order.date}</Text></td>
            </tr>
        ))}
    </table>
</Flex>
```

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/e5cf440-Figure_9_-_Displaying_data_in_a_table_card_example.png",
        "Figure 9 - Displaying data in a table card example.png",
        2880
      ],
      "align": "center",
      "caption": "Figure 2 - Displaying data in a table card example"
    }
  ]
}
[/block]

## Displaying Data in List Mode

In this example, there is an array of objects, and the goal is to create a list interface to show those values (Figure 3).

```html
<Flex direction="column" paddingX="1" gap="4" direction="column" width="100%">
    {[
        { label: 'Order Number', value: 'PT1234' },
        { label: 'Price', value: '5000€' },
        { label: 'Date', value: '22/10/26' }
    ].map((field) => (
        <Flex gap="1" direction="column" width="100%">
            <Label>{field.label}</Label>
            <Text>{field.value}</Text>
            <Divider />
        </Flex>
    ))}
</Flex>
```

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/f292b3a-Figure_10_-_Displaying_data_in_a_list_card_example.png",
        "Figure 10 - Displaying data in a list card example.png",
        2880
      ],
      "align": "center",
      "caption": "Figure 3 - Displaying data in a list card example"
    }
  ]
}
[/block]

## Trigger Action Button

These are basic examples of how you can use a *Button* to trigger an action.

### Setting Custom Variables

This example shows how a *Button* can be used to set or update variables.\
In this scenario, you can use the *onClick* handler with *Context.setVariable(“variable”, “value”)* to set the variable value. In this case, it is to confirm the payment variable as true (Figure 4).

```html
<Flex padding="8" direction="column" gap="4" width="100%" height="100%">
  <Text>The reservation {Context.getVariable("reservation_id")} has been created.</Text>
  <Flex width="100%" alignX="end" height="100%" alignY="end">
      <Button onClick={() => Context.setVariable("paid", "true")}>Confirm payment</Button>
  </Flex>
</Flex>
```

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/1dcda6f-Figure_11_-_Custom_variables_card_example.png",
        "Figure 11 - Custom variables card example.png",
        2880
      ],
      "align": "center",
      "caption": "Figure 4 - Custom variables card example"
    }
  ]
}
[/block]

### Following an Exit

This example shows how you can use an *Exit* when the user clicks a *Button*.\
In this scenario, when a *Button* is clicked, it executes the *goToExit* action and it will redirect the flow through the respective exit to the specified component (Figure 5).

```html
<Flex padding="8" direction="column" gap="4" width="100%" height="100%">
  <Text>The reservation {Context.getVariable("reservation_id")} was successfully canceled.</Text>
  <Flex width="100%" alignX="end" height="100%" alignY="end"
   onClick={() => actions.goToExit("back")}>
    <Button>Go Back</Button>
  </Flex>
</Flex>
```

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/612ee79-Figure_12_-_Follow_an_exit_code_example.png",
        "Figure 12 - Follow an exit code example.png",
        2880
      ],
      "align": "center",
      "caption": "Figure 5 - Follow an exit code example"
    }
  ]
}
[/block]

> 🚧 Troubleshooting
>
> If you have questions or technical issues, please open a ticket using [this form](https://support.talkdesk.com/hc/en-us/requests/new).