---
title: "Role Tag"
description: "A compact bordered tag with a coloured dot for displaying a member's role."
---

A compact bordered tag with a coloured dot for displaying a member's role. Compose it from the exported registry parts so local content and behaviour stay in the application while the visual contract stays token-driven.

_Live example of Role Tag — see the page for the rendered demo._

## Installation

```bash
npx newtui@latest add role-tag
```

Files written — React: components/ui/role-tag.tsx. Vue: components/ui/role-tag/RoleTag.vue, components/ui/role-tag/RoleTagDot.vue, components/ui/role-tag/index.ts.

## Usage

React:

```tsx
import { RoleTag } from "@/components/ui/role-tag"
```

Vue:

```ts
import { RoleTag, RoleTagDot } from "@/components/ui/role-tag"
```

## API reference

**`RoleTag`**

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `color` | `string \| undefined` | — | Role colour applied to the tag; the dot inherits it via `currentColor`. |

The registry exports `RoleTag`, `RoleTagDot`. Parts without a table accept the native attributes for the element they render; React uses `className`, while Vue uses `class` and fallthrough attributes.

## Accessibility

Preserve the native semantics of the rendered elements and pass through ARIA attributes when the surrounding context needs a label or description. Any interactive child needs a visible focus indicator, and meaning must not rely on colour alone.

## Tokens

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