Skip to content
Sign upPro
BillingTraining consentMenu

Training consent (Pro)

ProIncluded in $99

Data use choices at onboarding in plain language, off by default, with a summary of exactly what is shared.

ProOnboarding asks once, in plain words, with every sharing choice off and a summary that says what is shared.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/training-consent

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

tsx
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

ProNothing shared, and two choices on with the summary listing them.

Props

PropTypeNotes
choicesConsentChoice[]{ id, title, description, detail?, defaultOn?, required? }
value, onValueChangeRecord<string, boolean>Controlled or not
onConfirm, onLaterSave, or leave everything off for now
labelsPartial<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.