---
title: "User Panel"
description: "The strip at the foot of a sidebar: the signed-in user and their mute, deafen and settings controls."
---

Use it once per screen, pinned to the bottom of the navigation column, for the controls that belong to the person and not to the page: mute, deafen, open settings. It is the place a reader looks to check which account they are in.

Compose it from an avatar, `UserPanelInfo` and a `UserPanelActions` row of `UserPanelButton`s.

_Live example of User Panel — see the page for the rendered demo._

## Installation

```bash
npx newtui@latest add user-panel
```

Files written — React: components/ui/user-panel.tsx. Vue: components/ui/user-panel/UserPanel.vue, components/ui/user-panel/UserPanelInfo.vue, components/ui/user-panel/UserPanelActions.vue, components/ui/user-panel/UserPanelButton.vue, components/ui/user-panel/index.ts.

## Usage

React:

```tsx
import { UserPanel } from "@/components/ui/user-panel"
```

Vue:

```ts
import { UserPanel, UserPanelInfo, UserPanelActions, UserPanelButton } from "@/components/ui/user-panel"
```

## API reference

**`UserPanelInfo`**

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` | — | The account's display name. |
| `status` | `string` | — | The quieter line under the name: a status, a tag, an activity. |

**`UserPanelButton`**

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `icon` | `"microphone" \| "headphones" \| "settings"` | — | Which drawing the button carries. |
| `label` | `string` | — | The button's accessible name. It has no visible text. |
| `pressed / v-model:pressed` | `boolean` | — | Makes the button a switch and sets its state. Leave it out for a plain button. |
| `onPressedChange` | `(pressed: boolean) => void` | — | React only. Called with the new state; Vue emits `update:pressed`. |

`UserPanel` is a labelled region and `UserPanelActions` a plain row. Both take the attributes of the element they render.

## Accessibility

The panel is a `<section>` named "User controls"; pass `aria-label` to rename or translate it. Every button is named by its `label`, since an icon alone says nothing to a screen reader. A switch carries `aria-pressed`, and when it is on the icon is struck through as well as turned red, so muted and unmuted differ in shape. Name a switch for what it does ("Mute") and let the pressed state say whether it is on; do not swap the label to "Unmute".

[Translating labels](/docs/translating-labels) lists every English default.

## Tokens

User Panel reads its colours, radii and motion from the `--newt-*` tokens. Override a token rather than editing the component.
