um

Form builder

The chrome around a form control — the wrapper, the label and its required marker, the hint and the error line — and the look of the controls it builds, through config.control_class.

Fields

field builds its control from as:, or takes one from a block; group lays fields out in a row.

Only used to sign you in.

Invalid, disabled and read-only

An attribute with errors marks its control aria-invalid and reads the errors underneath.

Translation missing. Options considered were: - en.activemodel.errors.models.profile.attributes.name.blank - en.activemodel.errors.models.profile.blank - en.activemodel.errors.messages.blank - en.errors.attributes.name.blank - en.errors.messages.blank

Set by your administrator.

control_classes, outside a builder

A select_tag or a hand-written input wears the same classes, sized to sit level with buttons.

Notify me

Switches and sliders

switch_field is a checkbox with role switch, drawn as one. range_field is the native slider styled to match.

A slider, styled to match.

Radio groups

radio_button_collection in a fieldset named by legend:, with a hint under each option; variant: :cards makes the whole card the target.

Plan *
The same, as a list

Passwords and one-time codes

password_field reveal: true adds a button that shows what was typed. one_time_code_field is one real input drawn as a row of boxes, so paste and autofill just work. Needs import "unmagic/components/password" and "unmagic/components/one_time_code".

The button shows what you typed; the caret stays put.

Paste it, or let the phone fill it in.

Input groups

input_group joins a unit, a scheme, an icon or a button to either end of a control.

https:// .example.com

Autogrowing textarea

Grows from its rows up to its max-height, then scrolls. Needs import "unmagic/components/autogrow".

UUID field

A hidden field holding a fresh UUIDv7, minted again when the element upgrades and on every form reset. Needs import "unmagic/components/uuid_input".

Submits with a client-minted id; resetting the form mints another.