RightsMatrix
Rights by group: checkboxes that keep requirements, or marks with the roles that grant them.
function Role() {
const [groups, setGroups] = useState(PROJECT_GROUPS);
return (
<RightsMatrix className="w-640" searchable aria-label="Rights of Support lead" groups={groups} onRightsChange={(c) => setGroups((gs) => apply(gs, c))} />
);
}import { RightsMatrix } from "@logicplanes/kaeso-ui";Props
aria-labelstringThe accessible name of the matrix.
groupsRightsGroup[]The rights, by category, with who holds each.
onChange((code: string, granted: boolean) => void)The right the person toggled. With requirements, prefer
onRightsChange, which has every change at once.onRightsChange((changes: RightChange[]) => void)Every change one toggle makes, the toggled right first, then what it required or what required it.
originLabelsPartial<Record<"none" | "preset" | "added" | "removed", string>>What the origin column says:
{ preset: "From Developer" }. Defaults to "From role", "Added" and "Removed" in the provider's language.readOnlybooleanNo checkboxes: a mark per right and the roles that grant it.
searchablebooleanA search field above the groups that filters rights by name, code, description or group.