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.
Parameters
Section titled “Parameters”See RoleBadgeProps.
Returns
Section titled “Returns”Element
Example
Section titled “Example”<RoleBadge role="admin" />// Custom colors:<RoleBadge role="moderator" colors={{ moderator: "warning" }} />