> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Voices to DOM

> Fetch voices and display them in a <ul> element.

```typescript theme={null}
async function voicesListToDOM(client: Cartesia): Promise<void> {
  /** Fetch voices and display them in a <ul> element. */
  const ul = document.createElement('ul');

  for await (const voice of client.voices.list({ limit: 20 })) {
    const li = document.createElement('li');
    li.textContent = `${voice.name} (${voice.language})`;
    ul.appendChild(li);
  }

  document.body.appendChild(ul);
}
```

From [cartesia-js/examples/browser\_examples.ts:169](https://github.com/cartesia-ai/cartesia-js/blob/main/examples/browser_examples.ts#L169)

## Run this example

This example runs in the browser. See the [Next.js example](/examples/nextjs) for a working setup.
