Settings / Data & Privacy

Where people take their data out, decide how long it is kept and whether it may improve models, and close an account. Nothing irreversible happens in one click.

Get pro lifetime to installPro screen · 4 examples · built from 7 Liro components
Open full screen

When to use

  • The privacy page of a product that stores user data
  • Meeting data export and deletion requests without support
  • Letting customers control retention and model training

When not to use

The decision inside it

Deleting is scheduled, and cuts are previewed

Deleting an account starts a 14-day grace period with an export link and a Cancel button, and shortening retention first shows exactly what would be removed today. A slip of the mouse never destroys data.

Installation

Settings / Data & Privacy is a Pro screen, included with pro lifetime. It is two files on top of the Liro components it is made of.

  1. Add the components it uses:
    npx shadcn@latest add @liro/alert @liro/button @liro/dialog @liro/progress @liro/select @liro/settings-page @liro/switch
  2. Copy screens/data-privacy-screen.tsx and screens/data/data-privacy-screen.ts from the Code tab above into your project, at the same paths.
  3. It also imports @/demos/liro-mark, @/demos/portraits, @/demos/screen-kit and @/demos/settings-shell: Liro’s shared helpers and the demo’s sample images. Point them at your own.

Usage

app/page.tsx
import { DataPrivacyScreen } from "@/screens/data-privacy-screen";

export default function Page() {
  /* A screen fills the box it is given: give it the window. */
  return (
    <main className="h-dvh">
      <DataPrivacyScreen className="h-full" />
    </main>
  );
}

Built from

Every Liro component this screen imports. Each has its own page, props and install command.

API reference

Read from DataPrivacyScreenProps when the site is built. It also takes every attribute a div does, such as className.

DataPrivacyScreen

TypeNotes
stateDataPrivacyState No–
onSave(privacy: Privacy) => void | Promise<void> No–
loadingboolean NoThe data is on its way: the frame stays and the content is drawn as gray shapes in the shape of the real page.
onNavigate(label: string) => void NoCalled with the label of a sidebar or settings item when someone opens it ("Inbox", "Model policy"). Without it, a toast says where it would go.
workspaceScreenWorkspace NoThe workspace at the top of the sidebar.
userScreenUser NoThe signed-in person, at the bottom of the sidebar.
layoutScreenLayout No"inset": the page on a card beside a gray sidebar. "flat": the page edge to edge. Default "inset".
classNamestring No–

Accessibility

  • Destructive actions need a hold or typed confirmation, never one click
  • The deletion date and how to cancel are written out
  • Every switch states what it controls
  • Movement follows the reduced-motion setting

Responsive behavior

  • Fills the box it is given: mount it at the window's height
  • Cards stack on narrow widths
  • Light and dark come from the Liro theme: it follows the dark class on <html>, like every component.

More screens

Liro · 270 components · 17 screens · 4 templates