RightsMatrix

Rights by group: checkboxes that keep requirements, or marks with the roles that grant them.

View source
import { RightsMatrix } from "@logicplanes/kaeso-ui";

Props

  • aria-label
    string

    The accessible name of the matrix.

  • groups
    RightsGroup[]

    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.

  • originLabels
    Partial<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.

  • readOnly
    boolean

    No checkboxes: a mark per right and the roles that grant it.

  • searchable
    boolean

    A search field above the groups that filters rights by name, code, description or group.