Whether the privacy check is running, at what level, and what it does.
The off state is the important one. Where the check is not running, this says so in plain words: what you send goes to the AI as written. A privacy panel that renders the same everywhere would be telling people they are protected where they are not, which is worse than having no panel.
The defaults for running, offTitle and offText do not say where the check runs. Whether that is the person's laptop or the product's server differs per product, and a default that names the wrong one is a false privacy claim; a product that knows passes its own words.
The explanation names where the work happens - a small model on the person's own laptop, swapping details for placeholders before Send and putting the real ones back in the answer. "Your data is protected" is not a claim anybody can check.
import { PrivacyProtection } from '@redrob-labs/ui';
| Prop | Type | Notes |
|---|---|---|
state |
'on' | 'off' |
off when the check is not running for what this person sends, for whatever reason the product has. |
level |
string |
|
levels |
PrivacyLevel[] |
|
running |
string |
What is running, beside the live dot. Default "Running". Name the place when the product knows it ("Running on this laptop"); the default does not, because the same panel ships where the check runs on a server. |
summary |
React.ReactNode |
|
lede |
React.ReactNode | false |
false hides the explanation. |
card |
boolean |
false hides the status card. |
showLevels |
boolean |
false hides the level list. |
last |
React.ReactNode |
What it caught last, and when. |
onLabel |
string |
|
offTitle |
React.ReactNode |
Default "Privacy protection is off". |
offText |
React.ReactNode |
Default "What you send goes to the AI as written." Say why it is off and where it would work, when the product knows ("It runs on your laptop, so it only works in the desktop app."); the default cannot know, so it says only the consequence. |
foot |
React.ReactNode |
|
compact |
boolean |
Tightens the panel for a small surface - a composer popover rather than a settings page: a smaller status card, less space between parts, the levels in one column. The words are unchanged; only the room they take is. A page that heads a whole section leaves it off. |
onLevelChange |
(level: string) => void |
Lets the person choose the level in this panel, instead of only reading the admin's. When set, the level list becomes selectable and calls this with the chosen id. The panel is controlled: pass the chosen id back as level, or the radio announces a change and nothing moves. Omit it where the level is policy and the panel only reports it - the default, and what a product without a per-person setting should keep. |
locked |
boolean |
With onLevelChange, true means a team policy fixes the level: it still shows and stays reachable by keyboard and screen reader, but choosing another does nothing. |
lockedText |
React.ReactNode |
The reason the level is fixed, shown under the levels when locked. Default "Set by your team's policy." |
slotClassName |
{ card?: string; lede?: string; levels?: string; last?: string; foot?: string } |
Class names for the panel's own parts, so a consumer can restyle one without overriding the whole panel or reaching through rr- internals that may move. Each is added to its element; nothing is replaced. |
className |
string |