# Inline notice

> One fixable thing, said next to the field it is about, with the fix beside it, and what the paper will say until it is fixed.

Source: https://kwark.space/designSystem/components/inline-notice

## Usage

### What it is
A short message inside the content, at the place it is about: under a field, at the top of one section of a sheet, beside a scene in the breakdown. It names one condition and puts the fix next to it. It stays until the condition changes; it is never dismissed on its own.

### The Kwark idea: paper and digital together
Kwark builds the printed artefact and the structured record in one act (Decision 0005). So a notice about a call sheet says what the paper will show until it is fixed: *Prints as* **TBC**. A missing location does not block the issue; production goes on and the crew can see that the address is coming. This is the calm voice of Decision 0013: what happened, what is safe, what to do.

### Choose the right message
| Scope | Component |
|---|---|
| One field or one section | Inline notice (this page) |
| The whole screen: offline, read-only, another session | [Banner](https://kwark.space/designSystem/components/banner.md) |
| A fact about the page's data that is not a problem | [Callout](https://kwark.space/designSystem/components/callout.md) |
| A receipt for something just done | [Toast](https://kwark.space/designSystem/components/toast.md) |

### Tones
| Tone | When | Example |
|---|---|---|
| Warn | Something is missing or out of step, and the work can go on | *Location to be confirmed* |
| Info | Something changed that the person may want to look at | *Scene 12 changed in the screenplay after this sheet was marked* |
| Ok | A check passed that people would otherwise verify by hand | *Call times match the schedule* |
| Quiet | A limit of the person's role, without alarm | *Budget lines are hidden from your role* |
| Danger | Only when continuing would lose something; rare | *These 3 shots will be removed from Day 7* |

### Writing
- Lead with the condition in bold, in a few words. Then one sentence: what is still possible, or what changed.
- The action names the fix: *Add location*, *Review the changes*. A second, quieter choice when keeping things as they are is valid: *Keep as marked*.
- Never *Error*, *Invalid* or *Warning:*. No exclamation marks.

## Style

### Anatomy

1. **Box**: full width of its column, 10px 12px padding, 6px corners, 1px line at 32% of the tone into `--k-line`, ground at 8% of the tone into `--k-surface`.
2. **Notch** (attached form): a 10px turned square at the top, 16px from the left, pointing at the field above; the box sits 10px under the field.
3. **Glyph**: 16px in the tone.
4. **Text**: Poppins 12px at 1.55; the lead in 600.
5. **Actions**: 28px buttons and text buttons under the text, aligned with it.
6. **Prints as**: a paper chip in `--k-paper` with `--k-paper-ink` (paper stays paper in dark mode) showing the printed word.
7. **Field**: an attached warn notice gives its field a border at 70% `--k-warn`.

### Tokens

| Token | Light | Dark |
|---|---|---|
| `--k-warn` | #8a5a00 | #d8a44a |
| `--k-info` | #255799 | #7db4f0 |
| `--k-ok` | #2c6e49 | #6cc08a |
| `--k-danger` | #b4382c | #e0685c |
| `--k-surface` | #ffffff | #1a1a1a |
| `--k-line` | #e2e8f0 | rgba(255, 255, 255, .1) |
| `--k-text` | #0f172a | #e3e3e3 |
| `--k-text-2` | #5b6779 | #9ca3af |
| `--k-paper` | #fbfbf8 |  |
| `--k-paper-ink` | #1e2326 |  |
| `--k-radius-control` | 6px |  |
| `--k-fs-meta` | 12px |  |
| `--k-fs-dense` | 11px |  |
| `--k-icon-md` | 16px |  |

## Code

### 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`.

```html
<div class="kw-notice-field">
  <label class="kw-label">Day 7 location</label>
  <input class="kw-input" value="" placeholder="Add an address" aria-invalid="true">
  <div class="kw-notice kw-notice--attached" role="status"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m21.7 18-8-14a2 2 0 0 0-3.5 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3M12 9v4M12 17h.01"/></svg><span><strong>Location to be confirmed.</strong> Rev 3 can still be issued; the crew will see the address when you add it.</span>
    <div class="kw-notice__actions"><button class="kw-button" type="button">Add location</button><span class="kw-notice__prints">Prints as <b>TBC</b></span></div>
  </div>
</div>
<div class="kw-notice" data-tone="info" role="status"><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 16v-4M12 8h.01"/></svg><span><strong>Scene 12 changed in the screenplay</strong> after this sheet was marked. Two lines moved and the Zippo is new.</span>
  <div class="kw-notice__actions"><button class="kw-button" type="button">Review the changes</button><button class="kw-text-button" type="button">Keep as marked</button></div>
</div>
<div class="kw-notice" data-tone="ok" role="status"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21.8 10A10 10 0 1 1 17 3.3"/><path d="m9 11 3 3L22 4"/></svg><span><strong>Call times match the schedule.</strong> Mira 06:30, Aanya 07:15, unit call 07:30.</span></div>
<div class="kw-notice kw-notice--quiet"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg><span>Budget lines are hidden from your role. Ask Aanya if you need them for this sheet.</span></div>
```

## Accessibility

### Announcing
- A notice that appears after the person acts uses `role="status"` (polite). One already present on load needs no role.
- Never `role="alert"` for something the person can fix in their own time.

### Linking to the field
- The field's `aria-describedby` points at the notice, so a screen reader hears *Day 7 location, edit text, Location to be confirmed. Rev 3 can still be issued…*
- `aria-invalid="true"` only when the value is actually wrong, not merely missing and allowed.

### Contrast
The tone is in the glyph, the edge and the bold lead; the words carry the meaning. Text stays `--k-text` at 4.5:1 on the tinted ground in every room.

## For agents

### Rules

- **Must** sit next to the one field or section it is about, and name the fix in its action.
- **Always** say what the printed artefact will show until it is fixed ("Prints as TBC") when the notice is about paperwork.
- **Never** block an issue or a save for something that can be added later; say what is still possible.
- **Never** use an inline notice for a whole-screen state; that is a banner.
- **Must** link the notice to its field with aria-describedby and use role="status", not alert.

### AI readiness test

**Task:** Tell the 1st AD that Day 9 has no unit call time before issuing the call sheet.

**Give the agent:** This page, Call sheet, Decision 0005, Decision 0013.

**Constraint:** The call sheet may still be issued as a draft.

**A reliable answer:**
- Warn notice attached under the unit call field
- Bold lead "Unit call to be set."
- Says the sheet can still go out
- Action "Set unit call"
- "Prints as TBC" chip in paper colours
- Linked with aria-describedby
