Training consent (Pro)
ProIncluded in $99Data use choices at onboarding in plain language, off by default, with a summary of exactly what is shared.
On this page
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { TrainingConsent } from "@/components/ui/chatcn/pro/training-consent"
<TrainingConsent
choices={[
{ id: "training", title: "Improving the models", description: "Rated chats may be used to train future models.", detail: "…" },
{ id: "history", title: "Chat history", description: "", required: "Needed to show your past chats." },
]}
onConfirm={savePrivacy}
onLater={skip}
/>Every choice starts off unless you set defaultOn; consent defaults to no. Each says in one sentence what turning it on means, and the longer version (who sees what, for how long) is one click away. The summary at the top restates in words exactly what is being shared right now, so the reader never adds up switches. Choices the product cannot work without are shown as Always on with the reason, not as a switch that does nothing. Decide later shares nothing.
Examples
States
Props
| Prop | Type | Notes |
|---|---|---|
choices | ConsentChoice[] | { id, title, description, detail?, defaultOn?, required? } |
value, onValueChange | Record<string, boolean> | Controlled or not |
onConfirm, onLater | Save, or leave everything off for now | |
labels | Partial<TrainingConsentLabels> | Every string, for translation |
Accessibility
- Each switch is named by its title and described by its sentence.
- The summary is a polite live region, so changes are heard.
- Details are disclosure buttons that report their state.
Motion
Details open with a short rise. Nothing else moves.