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

# setUserName()

> Sets the local participant's display name, visible to all other participants.

`setUserName(name, options?)`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

In Daily Prebuilt, the name appears as a video overlay and in the chat. In custom call object builds, it is available on the `user_name` property of the local `DailyParticipant` object.

## Parameters

<ParamField body="name" type="string" required>
  The display name to set.
</ParamField>

<ParamField body="options.thisMeetingOnly" type="boolean">
  When `true`, the name change applies only for the current meeting and does not persist to the participant's profile. Defaults to `false`.
</ParamField>

## Return value

Returns a `Promise` that resolves to `{ userName: string }` — the name that was set.

## Example

```javascript theme={null}
const { userName } = await call.setUserName('Ada Lovelace');
console.log('Name set to:', userName);

// Change name for this meeting only
await call.setUserName('Ada (presenting)', { thisMeetingOnly: true });
```

## See also

<CardGroup>
  <Card title="Types" icon="t" iconType="solid">
    * [DailyCallOptions: userName](/reference/daily-js/types/daily-call-options#param-user-name)
    * [DailyParticipant](/reference/daily-js/types/daily-participant)
  </Card>

  <Card title="Methods" icon="code" iconType="solid">
    * [participants()](/reference/daily-js/instance-methods/participants)
    * [setUserData()](/reference/daily-js/instance-methods/set-user-data)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [participant-updated](/reference/daily-js/events/participant-events#participant-updated)
  </Card>

  <Card title="REST API" icon="server" iconType="solid">
    * [Create meeting token: user\_name](/reference/rest-api/meeting-tokens/create-meeting-token#body-properties-user-name)
  </Card>
</CardGroup>
