Skip to content

RoleBadge

RoleBadge(props): Element

Defined in: packages/ui/src/components/role-badge.tsx:27

Colored badge displaying a user’s role name.

Renders via the UI plugin’s chip slot. Default color mapping: admin = danger, editor = primary, author = success, reader = neutral. Pass a custom colors map to override or extend the defaults.

RoleBadgeProps

See RoleBadgeProps.

Element

<RoleBadge role="admin" />
// Custom colors:
<RoleBadge role="moderator" colors={{ moderator: "warning" }} />