#184
AppSettings
A settings page with General and Security tabs, a Save action and form sections with text fields and switches.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "AppSettings" pattern (@codeatlasdev/ui demo #184, layout/list-page) in my app.
Call get_demo({ ids: ["#184"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Workspace or account settings split into tabs, each with its own grouped form.
Keep these library parts, with the props and tokens the demo uses:
- AppSettings, Button, FormSection, Switch, TextField from "@codeatlasdev/ui"
Behaviour to keep:
- `<AppSettings title="Settings" tabs={TABS}>` with `const TABS` of 2 entries: General (`value: 'general'`) and Security (`value: 'security'`), each with an `icon`
- `{#snippet actions()}` holds `<Button variant="filled" size="sm">Save</Button>`
- `{#snippet children(tab)}` switches on `{#if tab === 'general'}` and `{:else if tab === 'security'}`
- General has `<FormSection title="Workspace">` with `<TextField label="Name" bind:value={wsName} />` and `<TextField label="Slug" value="my-workspace" />`
- Security has `<FormSection title="Authentication" layout="list">` with `<Switch label="Two-factor authentication" />` and `<Switch label="Single sign-on (SSO)" />`
- Frame size is `height: 380px`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- AppSettings
@codeatlasdev/ui - Button
@codeatlasdev/ui - FormSection
@codeatlasdev/ui - Switch
@codeatlasdev/ui - TextField
@codeatlasdev/ui
How it is built
- `<AppSettings title="Settings" tabs={TABS}>` with `const TABS` of 2 entries: General (`value: 'general'`) and Security (`value: 'security'`), each with an `icon`
- `{#snippet actions()}` holds `<Button variant="filled" size="sm">Save</Button>`
- `{#snippet children(tab)}` switches on `{#if tab === 'general'}` and `{:else if tab === 'security'}`
- General has `<FormSection title="Workspace">` with `<TextField label="Name" bind:value={wsName} />` and `<TextField label="Slug" value="my-workspace" />`
- Security has `<FormSection title="Authentication" layout="list">` with `<Switch label="Two-factor authentication" />` and `<Switch label="Single sign-on (SSO)" />`
- Frame size is `height: 380px`
Related
Loading source.