Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Settings/General from ./settings-general.
import { SettingsGeneralScreen } from "@/components/ui/settings-general";
export default function Page() {
return (
<SettingsGeneralScreen
workspace={{ name: "Acme", slug: "acme", context: "" }}
onSave={(workspace) => saveWorkspace(workspace)}
onDelete={() => deleteWorkspace()}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| workspace | { name: string; slug: string; context: string; icon?: string } | The workspace – the sample workspace when left out | |
| onSave | (workspace: WorkspaceValues) => void | Called with the whole workspace whenever something is saved – text on blur, the icon at once | |
| onDelete | () => void | Called once the deletion is confirmed by typing the workspace's name | |
| onNavigate | (label: string) => void | Called with the label of a settings page, or "Back to app" | |
| user | { name: string; avatar?: string } | Account at the bottom of the sidebar | |
| loading | boolean | While the workspace loads: its icon, name, address and company context as gray shapes in the shape of the real ones | |
| className | string | Extra class on the root |
Fills its container – give it the full viewport height in your app
Below 600px each control moves under its label, full width
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"; colors are CSS variables on .ui-as