j3w1 / theme

j3w1 / theme4.0.0

j3w1 / command

  • SPEC Overview
  • SPEC Foundations
  • SPEC Components
  • SPEC Patterns
  • SPEC Tokens
  • SPEC Tools
  • SPEC Workbench
  • SPEC Form builder
  • SPEC Task kit
  • SPEC Recipes
  • SPEC Figma bridge
  • SPEC Report an issue
  • SPEC Implement
  • SPEC For agents
  • SPEC Ports
  • SPEC Releases
  • SPEC Specification
  • DEMO Vue application demo

Admin form

A create-or-edit record screen composed from breadcrumbs, a wizard step list, alerts, six field components and a button row; the review step is a table with an Edit button per row.

stable · light DOM · 4.0.0. Light DOM retains static content, native semantics, label relationships and host composition without duplicating controls.

Live variants

default

Project details

Review the local values before passing them to your app.

Project information

Markup
<j3w1-admin-form id="example-admin-form-default"><section class="admin-form"><h2 class="admin-form-title">Project details</h2><p>Review the local values before passing them to your app.</p><form data-native-form=""><fieldset class="fieldset"><legend>Project information</legend><j3w1-text-field><div class="text-field"><label class="text-field-label" for="example-admin-form-default-project-name">Project name</label><div class="text-field-root"><input class="text-field-input" id="example-admin-form-default-project-name" name="example-admin-form-default-project" value="Atlas library" required=""></div></div></j3w1-text-field><j3w1-textarea><div class="textarea"><label class="textarea-label" for="example-admin-form-default-project-notes">Notes</label><textarea class="textarea-input" id="example-admin-form-default-project-notes" name="example-admin-form-default-notes" rows="3">A reusable component library.</textarea></div></j3w1-textarea><j3w1-select><div class="select"><label class="select-label" for="example-admin-form-default-project-scope">Scope</label><div class="select-root"><select class="select-control" id="example-admin-form-default-project-scope" name="example-admin-form-default-scope"><option value="library">Library</option><option value="application">Application</option></select></div></div></j3w1-select></fieldset><div class="form-tool-actions"><button class="button" type="submit">Review values</button><button class="button button-secondary" type="reset">Reset</button></div></form><section data-form-review="" hidden="" aria-label="Review project values"><h3 tabindex="-1">Review values</h3><table class="table"><caption>Values to pass to the host</caption><tbody></tbody></table><div class="form-tool-actions"><button class="button button-secondary" type="button" data-form-edit="">Edit values</button><button class="button" type="button" data-form-confirm="">Confirm values</button></div></section><p role="status" data-form-status=""></p></section></j3w1-admin-form>

review

Project details

Review the local values before passing them to your app.

Project information

Markup
<j3w1-admin-form id="example-admin-form-review"><section class="admin-form" data-start="review"><h2 class="admin-form-title">Project details</h2><p>Review the local values before passing them to your app.</p><form data-native-form=""><fieldset class="fieldset"><legend>Project information</legend><j3w1-text-field><div class="text-field"><label class="text-field-label" for="example-admin-form-review-project-name">Project name</label><div class="text-field-root"><input class="text-field-input" id="example-admin-form-review-project-name" name="example-admin-form-review-project" value="Atlas library" required=""></div></div></j3w1-text-field><j3w1-textarea><div class="textarea"><label class="textarea-label" for="example-admin-form-review-project-notes">Notes</label><textarea class="textarea-input" id="example-admin-form-review-project-notes" name="example-admin-form-review-notes" rows="3">A reusable component library.</textarea></div></j3w1-textarea><j3w1-select><div class="select"><label class="select-label" for="example-admin-form-review-project-scope">Scope</label><div class="select-root"><select class="select-control" id="example-admin-form-review-project-scope" name="example-admin-form-review-scope"><option value="library">Library</option><option value="application">Application</option></select></div></div></j3w1-select></fieldset><div class="form-tool-actions"><button class="button" type="submit">Review values</button><button class="button button-secondary" type="reset">Reset</button></div></form><section data-form-review="" hidden="" aria-label="Review project values"><h3 tabindex="-1">Review values</h3><table class="table"><caption>Values to pass to the host</caption><tbody></tbody></table><div class="form-tool-actions"><button class="button button-secondary" type="button" data-form-edit="">Edit values</button><button class="button" type="button" data-form-confirm="">Confirm values</button></div></section><p role="status" data-form-status=""></p></section></j3w1-admin-form>

Install and register

Use the exact version. If npm publication is pending, install the release tarball from the installation guide.

npm install --save-exact @j3w1/ui@4.0.0
import '@j3w1/ui/tokens.css';
import '@j3w1/ui/styles/admin-form.css';
import '@j3w1/ui/register/admin-form';

Insert the maintained markup above after loading these imports. Its native children provide accessible names and form behavior; the empty custom tag alone does not create a control.

Vue SFC, React, Astro and plain HTML integration →

Copy the complete implementation

npx --package=@j3w1/ui@4.0.0 j3w1-ui copy admin-form --out ./vendor/j3w1/admin-form

The CLI verifies every file before writing and refuses overwrites. Serve the output over HTTP and open index.html. Keep its modules, CSS, tokens and licence notices together.

Public API

attributes

NameType / signatureMeaning
disabledCustomEventDisable the native controls owned by this instance.
loadingCustomEventMark the primary control busy and prevent duplicate activation.

properties

NameType / signatureMeaning
disabledbooleanDelegates disabled state to native children.
namestringNative control name; application form keys remain explicit.

methods

NameType / signatureMeaning
refresh(): voidReconnect behavior after replacing native child structure.
focus(options?: FocusOptions): voidFocus the first usable native control.

events

NameType / signatureMeaning
j3w1-submitCustomEventValidated local native form values; the host owns saving.

Dependencies and verification

Registered components: text-field, textarea, select. Style dependencies: button, field, text-field, checkbox, radio-group, select, switch, textarea, fieldset, table.

Package presence establishes an available implementation. Actual passes depend on the tested artifact and environment. Read specification execution evidence; read packed-consumer evidence; inspect the complete state matrix.

Full implementation manifest, API and token dependency closure

Canonical specification

Admin form admin-form

  • Family: Composed specimens
  • Maturity: stable
  • Priority: R1
  • Since: 0.1.0
  • Native control: region landmark named by the h2; a Breadcrumb nav landmark; the wizard step list with aria-current=step; role=status and role=alert notices; a form landmark of native controls; aria-busy on the form while saving; a disabled fieldset around it while inert — APG pattern
  • specified
  • demonstrated
  • test implemented

A create-or-edit record screen composed from breadcrumbs, a wizard step list, alerts, six field components and a button row; the review step is a table with an Edit button per row.

Report an issue with this component

Tokens

Focus a role to inspect its values; follow its link for persistent usage and source details.

PartRoleValueUse
root.bgcolor.surface.defaultapproveduse#0d0707D-041 surface.default: color.primitive.modern.panel.
root.bordercolor.border.defaultapproveduse#482b2bD-041 border.default: color.primitive.modern.divider.
crumbs.linkcolor.text.linkapproveduse#f73f35Strong red link text, distinct from rose body text and headings; retain the underline.
crumbs.currentcolor.text.brightapproveduse#ffa2a7D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
title.textcolor.text.brightapproveduse#ffa2a7D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
step.textcolor.text.defaultapproveduse#e99499D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
step.current-textcolor.text.brightapproveduse#ffa2a7D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
step.current-indicatorcolor.border.selected-indicatorobserveduse#e539352px indicator bar on the selected tab or nav item.
step.completecolor.status.success.textapproveduse#82d9a0D-041 status.success.text: color.primitive.modern.green.
step.invalidcolor.status.danger.textobserveduse#f07178D-041 readable error text on neutral surfaces and native warning tints.
notice.tintcolor.status.info.tintapproveduse#0f141cInfo background tint.
notice.bordercolor.status.info.borderapproveduse#82b4ffD-041 status.info.border: color.primitive.modern.blue.
notice.textcolor.status.info.textapproveduse#82b4ffD-041 status.info.text: color.primitive.modern.blue.
summary.tintcolor.status.danger.tintobserveduse#2b0e0dDanger background tint.
summary.bordercolor.status.danger.borderobserveduse#e53935Danger border, 2px on invalid inputs.
summary.textcolor.status.danger.textobserveduse#f07178D-041 readable error text on neutral surfaces and native warning tints.
field.bgcolor.surface.inputapproveduse#000000Form-control fill.
field.bordercolor.border.controlapproveduse#c81a1aD-041 owner correction: red control and floating-frame borders, distinct from rose text.
field.textcolor.text.defaultapproveduse#e99499D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
field.labelcolor.text.brightapproveduse#ffa2a7D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
field.helpcolor.text.mutedapproveduse#d4868bD-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
field.affixcolor.text.mutedapproveduse#d4868bD-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
invalid.bordercolor.status.danger.borderobserveduse#e53935Danger border, 2px on invalid inputs.
invalid.messagecolor.status.danger.textobserveduse#f07178D-041 readable error text on neutral surfaces and native warning tints.
disabled.bgcolor.interaction.disabled.bgapproveduse#0d0707D-041 interaction.disabled.bg: color.primitive.modern.panel.
disabled.textcolor.text.disabledapproveduse#a3676bD-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
disabled.bordercolor.border.disabledapproveduse#482b2bD-041 border.disabled: color.primitive.modern.divider.
review.keycolor.text.mutedapproveduse#d4868bD-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
review.header-rulecolor.border.strongobserveduse#9e231fEmphasised 2px rule: sticky headers, section ends.
review.row-rulecolor.border.dividerapproveduse#482b2bD-041 border.divider: color.primitive.modern.divider.
footer.bordercolor.border.dividerapproveduse#482b2bD-041 border.divider: color.primitive.modern.divider.
continue.bgcolor.action.primary.bgapproveduse#7d1310Primary button fill; D-026 darkened it off color12, which stays fixed as heritage ANSI 12.
continue.textcolor.action.primary.textapproveduse#ffa2a7Primary action labels: bright rose across rest, hover and pressed states (D-033).
continue.busy-glyphcolor.action.primary.textapproveduse#ffa2a7Primary action labels: bright rose across rest, hover and pressed states (D-033).
back.textcolor.action.secondary.textapproveduse#ffa2a7D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
back.bordercolor.action.secondary.borderapproveduse#986f72D-041 action.secondary.border: color.primitive.modern.control.
draft.textcolor.action.tertiary.textapproveduse#e99499D-041 owner correction: rose is the default UI and reading foreground; near-white is reserved for document headings, highlights and contrast-critical fills.
draft.bg-hovercolor.action.tertiary.hover-bgobserveduse#1c0a09Ghost and icon button hover.

State matrix

Every declared state and combination, statically rendered; the default cell is live. Sizes: compact, comfortable (switch with the density control above).

StateIdentity stepReview step
default

New workstation

Draft

Nothing is created until Review; Save draft keeps the record locally.

Shown in the bar and the records list.

✕ A workstation named ws-07 already exists.

Letters, digits and hyphens; the domain is fixed.

✕ ws-07.lan is already registered.

Decides the default workspace layout.

✕ Choose a role.

Today if left unchanged.

✕ Not in the future.

No file chosen

One .pub file; ed25519 preferred.

✕ Only a .pub file.

31 / 200

Plain text; shown on the record page.

✕ Over the limit.

✕ Confirm before continuing.

New workstation

Review

Edit returns to the step that owns the value; Save creates the record.

Values entered so far
Field Value Actions
Namews-07
Hostnamews-07.lan
RoleDevelopment
Commissioned on2026-09-06
SSH public keyws-07.pub (ed25519)
Network10.0.7.12 / 24, DNS from DHCP
EnabledYes, after saving
invalid
busy
disabled

Purpose

A record screen proving that the advanced form components compose with the navigation and feedback components, then the same screen at its review step. It shows validation, saving and inertness across a whole form; it does not prescribe a product.

Anatomy

Parts as listed in the anatomy; each is the contained component’s own markup and classes.

States

StateVisualNon-colour channel
defaultevery component’s rest tokens on color.surface.default; the current step carries the indicator bar, future steps are disabledaria-current="step"
invalidname and hostname take the 2px color.status.danger.border and ✕ messages; the current step’s marker becomes ✕; a danger summary on color.status.danger.tint naming the two fields replaces the notice; other fields stay at restborder 1 → 2px; glyphs; aria-invalid; role="alert"
busyContinue shows the static ⋯ in color.action.primary.text; nothing shrinks or animatesglyph; aria-busy on the form; cursor: progress
disabledevery control takes its component’s disabled treatment (color.text.disabled, color.border.disabled, color.interaction.disabled.bg); labels and review keys dim; no hoverdisabled on the wrapping fieldset; cursor: not-allowed; never opacity

Contained components keep their own hover, focus-visible, required, placeholder-shown and read-only states; this table adds only the form-level ones.

Keyboard

The region, the Breadcrumb navigation and the form are offered as landmarks by name. In the review variant the Edit buttons are ordinary stops inside the table. Nothing traps focus.

Accessibility

The h2 names both the region and the form. Complete steps read ”, complete” through a visually hidden suffix; future steps are disabled, not hidden. The summary alert is announced once on submit; each field’s message stays linked by aria-describedby. Inside the disabled fieldset every control reports its state natively. The review table has a caption, column headers and row headers; each Edit button names its field through a visually hidden suffix. Text meets 4.5:1 and the invalid boundary 3:1; disabled text is exempt (house floor 3:1).

Portability

No script is needed to render any state. Toolkits port each contained component through its own mapping.

Non-examples

A rounded card with a drop shadow. A Material stepper with numbered circles and a connecting line. A red banner across the whole form instead of the summary alert plus field messages. Field borders that glow red. A spinner replacing the Continue label. Fields fading to half opacity while saving. A sticky footer bar with a shadow.

Contrast report

22 declared pairs measured on resolved sRGB values with the WCAG 2.x formula; 0 waived (decorative only), 0 failing. A pass is a design target for the named role, not an application-wide conformance claim.

PairStateKindForegroundBackgroundRatioMinResult
admin-form default textdefaulttextcolor.text.default #e99499color.surface.input #0000009.164.5pass
admin-form default borderdefaultuicolor.border.control #c81a1acolor.surface.input #0000003.623pass
admin-form invalid textinvalidtextcolor.status.danger.text #f07178color.status.danger.tint #2b0e0d6.274.5pass
admin-form invalid borderinvaliduicolor.status.danger.border #e53935color.status.danger.tint #2b0e0d4.243pass
admin-form busy textbusytextcolor.action.primary.text #ffa2a7color.action.primary.bg #7d13105.574.5pass
title, labels and the current step on the panel surface—textcolor.text.bright #ffa2a7color.surface.default #0d070710.454.5pass
help, affix and review keys on the panel surface—textcolor.text.muted #d4868bcolor.surface.default #0d07077.224.5pass
breadcrumb links on the panel surface—textcolor.text.link #f73f35color.surface.default #0d07075.444.5pass
complete-step check—textcolor.status.success.text #82d9a0color.surface.default #0d070711.794.5pass
notice title on its tint—textcolor.status.info.text #82b4ffcolor.status.info.tint #0f141c8.734.5pass
notice text on its tint—textcolor.text.default #e99499color.status.info.tint #0f141c8.064.5pass
summary text on the danger tintinvalidtextcolor.text.default #e99499color.status.danger.tint #2b0e0d7.824.5pass
field messages on the panel surfaceinvalidtextcolor.status.danger.text #f07178color.surface.default #0d07076.984.5pass
invalid field boundaryinvaliduicolor.status.danger.border #e53935color.surface.input #0000004.973pass
current-step indicator bar—uicolor.border.selected-indicator #e53935color.surface.default #0d07074.733pass
Back button and file-input button boundaries—uicolor.action.secondary.border #986f72color.surface.default #0d07074.623pass
disabled control text (exempt; house floor 3:1)disableduicolor.text.disabled #a3676bcolor.interaction.disabled.bg #0d07074.483pass
disabled labels and review keys (exempt; house floor 3:1)disableduicolor.text.disabled #a3676bcolor.surface.default #0d07074.483pass
disabled boundaries (exempt)disableduicolor.border.disabled #482b2bcolor.interaction.disabled.bg #0d07071.581pass
review header rule (decorative)—uicolor.border.strong #9e231fcolor.surface.default #0d07072.581pass
panel edge (decorative)—uicolor.border.default #482b2bcolor.surface.default #0d07071.581pass
step, row and footer rules (decorative)—uicolor.border.divider #482b2bcolor.surface.default #0d07071.581pass

Keys

KeyAction
Tab / Shift+TabBreadcrumb links, the reachable step buttons, then every field in reading order, then Back, Save draft and Continue; the file-input's native input is the stop and its button label is drawn with the ring.
EnterFollows a breadcrumb, activates a step or a button; in a text field submits the form in a host.
SpaceToggles the checkbox; opens the file chooser from the file-input.
Arrow keysMove within the select and the date field's segments.
EscapeNothing; the screen is not a dialog.

For agents

Component JSON ·Implementation brief ·Build a task kit ·

Related: breadcrumbs wizard alert text-field select date-picker file-input textarea checkbox button table

Stress fixtures: FX-STATE-MATRIX FX-LONG FX-320 FX-360 FX-ZOOM-200 FX-RM FX-HC FX-I18N FX-RTL FX-DENSITY