<div class="kw-specimen-row">
<fieldset class="kw-choices"><legend class="kw-label">Print with</legend>
<label class="kw-choice"><input type="checkbox" checked><span>Scene numbers in both margins</span></label>
<label class="kw-choice"><input type="checkbox" checked><span>Revision marks<small>An asterisk in the right margin beside each changed line.</small></span></label>
<label class="kw-choice"><input type="checkbox"><span>Character colours<small>Prints in colour; leave off for a black-and-white copier.</small></span></label>
<label class="kw-choice"><input type="checkbox" disabled><span>The outline in the margin<small>This script has no outline yet.</small></span></label>
</fieldset>
<fieldset class="kw-choices"><legend class="kw-label">Paper</legend>
<label class="kw-choice"><input type="radio" name="kw-paper" checked><span>A4<small>60 lines a page</small></span></label>
<label class="kw-choice"><input type="radio" name="kw-paper"><span>US Letter<small>55 lines a page</small></span></label>
</fieldset>
</div>
<fieldset class="kw-choices kw-choices--invalid" aria-describedby="kw-cr-err"><legend class="kw-label">Send Rev 4 to</legend>
<label class="kw-choice"><input type="checkbox" aria-invalid="true"><span>Cast</span></label>
<label class="kw-choice"><input type="checkbox" aria-invalid="true"><span>Camera and lighting</span></label>
<label class="kw-choice"><input type="checkbox" aria-invalid="true"><span>Production office</span></label>
<span class="kw-error" role="alert" id="kw-cr-err"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 8v4M12 16h.01"/></svg>Choose at least one group to send the call sheet to.</span>
</fieldset>
What it is
Kwark uses the browser’s own checkbox and radio, coloured with the project’s accent through accent-color (StorySurface.css). Native boxes stay readable by every assistive tool, follow the platform’s high-contrast modes, and never drift out of step with keyboard behaviour.
- Checkbox: independent yes/no choices, saved with the form: Scene numbers in both margins, Revision marks.
- Radio: exactly one of two to five, all visible: A4 or US Letter.
When to use which
| Need | Use |
|---|---|
| Any number of independent options | Checkboxes |
| Exactly one, all options worth reading | Radios |
| One of two or three, as a mode | Segmented control |
| Applies the moment it changes | Switch |
| One of many | Select |
Writing labels
- Say what is true when checked: Revision marks, not Show revision marks?
- Put the consequence in a hint under the label, in plain words: 60 lines a page; Prints in colour; leave off for a black-and-white copier.
- A disabled option says why: This script has no outline yet. Structure is optional (Decision 0003); the option waits, it does not push.
Behaviour
- The whole label is the target; at 44px tall on touch.
- Radios start with the current or most common value chosen; never leave a radio group with nothing chosen.
- A required group shows its error under the group, naming what it blocks.
Revision marks — An asterisk in the right margin beside each changed line.
Revision marks? with no hint, and a custom-drawn box that ignores Space.
Anatomy
- Box: native, 16px,
accent-color: var(--k-accent); 2px down so it sits on the first line of text. - Grid: box and text in two columns (16px, then the rest), 10px apart, so hints align with the label text, not under the box.
- Label: 14px
--k-text, line height 1.4. Hint: 12px--k-text-2at 1.45, 1px below. - Rows: 6px above and below (10px on touch), stacked with 4px between.
- Group: a
fieldsetwithout a border; thelegendis the field label (500 12px). - Disabled: label in
--k-text-2,not-allowedcursor, the reason as the hint. - Error: the legend in
--k-dangerand the message under the group, tied to the fieldset; the boxes stay native.
Tokens
| Token | Light | Dark |
|---|---|---|
--k-accent |
#98633f | #98633f |
--k-accent-soft |
#e8b58b | #e8b58b |
--k-text |
#0f172a | #e3e3e3 |
--k-text-2 |
#5b6779 | #9ca3af |
--k-danger |
#b4382c | #e0685c |
--k-fs-body |
14px | |
--k-fs-meta |
12px |
React
Use the HTML below with kwark.css. The example shows the markup and styling. Supply any application behavior described on this page.
HTML and CSS
Works anywhere with kwark.css.
<div class="kw-specimen-row">
<fieldset class="kw-choices"><legend class="kw-label">Print with</legend>
<label class="kw-choice"><input type="checkbox" checked><span>Scene numbers in both margins</span></label>
<label class="kw-choice"><input type="checkbox" checked><span>Revision marks<small>An asterisk in the right margin beside each changed line.</small></span></label>
<label class="kw-choice"><input type="checkbox"><span>Character colours<small>Prints in colour; leave off for a black-and-white copier.</small></span></label>
<label class="kw-choice"><input type="checkbox" disabled><span>The outline in the margin<small>This script has no outline yet.</small></span></label>
</fieldset>
<fieldset class="kw-choices"><legend class="kw-label">Paper</legend>
<label class="kw-choice"><input type="radio" name="kw-paper" checked><span>A4<small>60 lines a page</small></span></label>
<label class="kw-choice"><input type="radio" name="kw-paper"><span>US Letter<small>55 lines a page</small></span></label>
</fieldset>
</div>
<fieldset class="kw-choices kw-choices--invalid" aria-describedby="kw-cr-err"><legend class="kw-label">Send Rev 4 to</legend>
<label class="kw-choice"><input type="checkbox" aria-invalid="true"><span>Cast</span></label>
<label class="kw-choice"><input type="checkbox" aria-invalid="true"><span>Camera and lighting</span></label>
<label class="kw-choice"><input type="checkbox" aria-invalid="true"><span>Production office</span></label>
<span class="kw-error" role="alert" id="kw-cr-err"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 8v4M12 16h.01"/></svg>Choose at least one group to send the call sheet to.</span>
</fieldset>
Keyboard
| Key | Checkbox | Radio group |
|---|---|---|
| Tab | Each checkbox | Into the group (the chosen radio), then out |
| Space | Toggles | Chooses the focused radio |
| Arrow keys | — | Move and choose within the group |
Rules
- Native inputs, never hidden behind a drawn box that loses focus.
- Group radios, and related checkboxes, in a
fieldsetwith alegend. - A group error is tied to the fieldset with
aria-describedbyand announced once. - Focus shows the 2px
--k-accent-softring 2px off the box.
Rules
- Must use native checkbox and radio inputs, coloured with accent-color.
- Must wrap radio groups in a fieldset with a legend.
- Always write a label that states what is true when checked, with consequences in a hint.
- Never leave a radio group with nothing chosen.
- Always give a disabled option its reason in words.
AI readiness test
Task. Build the print options for a screenplay export.
Give the agent. Checkbox and radio, Print and export pattern.
Constraint. Paper size is one of A4 or US Letter; scene numbers and revision marks are optional.
A reliable answer
- Radios for paper in a fieldset with line counts as hints
- Checkboxes for scene numbers and revision marks
- Labels state what is true
- Native inputs with accent-color