Conditional fields & address autocomplete

field-ui input-ui select-ui card-ui radio-ui

Two adjacent form patterns: revealing fields based on prior answers (07i) and address-input that resolves a free-text query into structured fields (07j). Both compose existing form primitives — the pattern is in the wiring, not in new components.

When to use

Conditional reveal: when the field set depends on a categorical answer ("If 'Other', specify…", "If 'Business', show tax ID"). Address autocomplete: any place a user enters a postal address that downstream systems need structured (billing, shipping, KYC, support tickets).

Conditional reveal

A select or radio determines which sub-fields render. Hidden fields are not just `display: none` — they're removed from the form so they don't submit. When revealed, they animate in and the form's height grows; focus moves to the first revealed field.

Account type We'll show the fields you need based on this

Address autocomplete

Single input that opens a `menu-ui` of suggestions as the user types. Each suggestion shows the formatted address with the matched portion highlighted. Selecting a suggestion fills the structured fields below; clicking "Enter manually" reveals the structured fields directly.

Billing address
500 Market Street San Francisco, CA 94105 · USA 500 Market Place Chattanooga, TN 37402 · USA 500 Market Square Pittsburgh, PA 15222 · USA Enter address manually

Resolved address — structured fields

After a suggestion is picked (or the user chose "Enter manually"), the structured fields appear, prefilled. The user can correct any line. Country drives the field set — US postal codes are different shape from CA, UK, etc.

Address details

Composition rules

See also