Preferences
Edit profile details in compact settings rows and manage notifications. Install the block and connect its callbacks to your app.
Try the whole flow
Live componentPreferences
Profile and notification settings.
Usage
your-page.tsx
123import { Preferences } from "@/components/preferences"
<Preferences onSave={(value) => console.log(value)} />The example stores state locally while mounted. Connect onSave to your app’s persistence. PreferencesValue is exported for typed integration. Handle loading and server failures in your app before treating a save as permanent.
Installation
The block includes all its components, dependencies, helper, theme, and JZB UI design skill.
Terminal
1pnpm dlx shadcn@latest add https://jzbui.com/r/preferences.jsonBehavior & accessibility
- Name and email validation prevents incomplete saves. Errors are connected to fields.
- Save records the current values locally. Reset returns to the last save.
- General and Notifications share parent state; changing tabs preserves edits.