Drawer form
deprecatedDeprecated — use Form-less dialog (dialog family) — first case: „Nový kontakt", proposal /preview/_navrhy/ramec.html?b=navrh&v=osoba instead. AD 14 September 2026 (OV-2): „drawer form už na nic nepoužíváme, nebudeme používat" — replaced by the form-less dialog. Code on main still has 20 <DrawerForm> call sites in 17 files (Lidé, Firmy, Banka, Majetek, Uživatelé, Zasedačky, Pokladna, Rozpočty, Telefony, Týmy, Vozidla, Dokumenty, Šanony, AI zaměstnanci, provize, náklady) — migration is open work, not done. Existing usages stay until they are migrated; do not build anything new on it.
Deprecated — create/edit forms move to the form-less dialog (e.g. „Nový kontakt"). The side panel with a field form is no longer used for new work.
Used in 18 files · 13 areas · 85× — components/deal, components/mail, components/orders, components/products, components/projects, pages/AiZamestnanciPage …
@acrm/ui <DrawerForm> <DrawerField>.pdr .pdr-top .pdr-body .pdr-footSourceStoryLegacy card drawer-form.htmlDefault
export const Default = () => (
<Stage>
<ContactForm prefill="Jan Novák" />
</Stage>
);Variants
create form — the primary action carries the verb („Vytvořit“), not „OK“
short form — the drawer keeps its width whatever the number of fields
export const Variants = () => (
<div style={{ display: 'grid', gap: 'var(--sp-5)' }}>
<Labeled text="create form — the primary action carries the verb („Vytvořit“), not „OK“">
<Stage h={400}>
<ContactForm prefill="Jan Novák" />
</Stage>
</Labeled>
<Labeled text="short form — the drawer keeps its width whatever the number of fields">
<Stage h={300}>
<DrawerForm
title="Nový štítek"
icon="tag"
submitLabel="Přidat"
canSubmit
pending={false}
onClose={() => {}}
onSubmit={() => {}}
>
<DrawerField label="Název">
<Input autoFocus defaultValue="Investoři" />
</DrawerField>
</DrawerForm>
</Stage>
</Labeled>
</div>
);States
not ready — the form is empty, so the primary action is off (type a name and it turns on)
saving — the primary action shows „Ukládám…“ and is not clickable again
failed — one sentence at the end of the form; everything the user typed stays where it was
export const States = () => (
<div style={{ display: 'grid', gap: 'var(--sp-5)' }}>
<Labeled text="not ready — the form is empty, so the primary action is off (type a name and it turns on)">
<Stage h={400}>
<ContactForm />
</Stage>
</Labeled>
<Labeled text="saving — the primary action shows „Ukládám…“ and is not clickable again">
<Stage h={400}>
<ContactForm prefill="Jan Novák" pending />
</Stage>
</Labeled>
<Labeled text="failed — one sentence at the end of the form; everything the user typed stays where it was">
<Stage h={400}>
<ContactForm prefill="Jan Novák" error />
</Stage>
</Labeled>
</div>
);Composition
export const Composition = () => (
<div
style={{
display: 'grid',
gridTemplateColumns: '1fr auto',
height: 420,
border: '1px solid var(--border)',
borderRadius: 'var(--radius-md)',
overflow: 'hidden',
background: 'var(--bg-canvas)',
}}
>
<div style={{ padding: 'var(--sp-5)', color: 'var(--fg-muted)', font: 'var(--small)' }}>
Výpis kontaktů — the drawer takes the right-hand slot of the app shell (`.as-drawer`); the
list stays readable next to it instead of being covered by a modal.
</div>
<ContactForm prefill="Jan Novák" />
</div>
);