<div class="kw-dial-demo" style="width:100%;align-items:flex-end">
<button class="kw-dial" type="button" aria-label="Close" aria-expanded="true"><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="M18 6 6 18M6 6l12 12"/></svg></button>
<div style="display:flex;flex-direction:column;align-items:flex-end;gap:8px" role="group" aria-label="Comments, quick note and account">
<button class="kw-dial__item" type="button"><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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><path d="M8 9h8M8 13h5"/></svg>Comments</button>
<button class="kw-dial__item" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 20h9M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4z"/></svg>Quick note</button>
<button class="kw-dial__item" type="button"><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="8" r="5"/><path d="M20 21a8 8 0 0 0-16 0"/></svg>Sign in</button>
</div>
</div>
There is one floating control per phone screen, never more. It is draggable to either edge. Pages reserve --k-fab-slot at their foot so the dial never sits on the last row.
Anatomy
- Button: 48px circle, 1px
--k-line,--k-surface, a 20px message glyph;--k-shadow-pop; fixed 16px from the right and the bottom (or the safe area). - Mention dot: 10px in
--k-accentwith a 2px ring, top-right, only when someone wrote to you. The only badge (Decision 0016). - Items: 44px pills, 0 16px 0 12px, 1px line, 14px Poppins 500, a 16px glyph in
--k-text-2, 8px apart above the button: Comments, Quick note, Account (Sign in for a guest). - Scrim: the page dims behind the open dial.
- Tucked: while typing or scrolling down it slides off the corner, and comes back on the way up.
- Room: pages keep
--k-fab-slot(78px plus the safe area) free at their foot.
Tokens
| Token | Light | Dark |
|---|---|---|
--k-surface |
#ffffff | #1a1a1a |
--k-line |
#e2e8f0 | rgba(255, 255, 255, .1) |
--k-text |
#0f172a | #e3e3e3 |
--k-text-2 |
#5b6779 | #9ca3af |
--k-accent |
#98633f | #98633f |
--k-shadow-pop |
0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .12) | 0 2px 6px rgba(0, 0, 0, .2), 0 16px 36px rgba(0, 0, 0, .55) |
--k-tap |
44px | |
--k-fab-slot |
calc(78px + env(safe-area-inset-bottom)) | |
--k-radius-pill |
999px | |
--k-fs-body |
14px |
React
In the Kwark app: import { PageHeader } from '@/components/ui/PageHeader'.
// The dial is mounted by PageHeader; Comments, Quick note and Account draw into its slots.
<PageHeader title="Characters" onBack={back} actions={<TextButton label="Menu" opens onClick={openMenu} />} />
| Prop | Type | Notes |
|---|---|---|
dial |
boolean |
default true; false only for a picture of a header |
HTML and CSS
Works anywhere with kwark.css.
<div class="kw-dial-demo" style="width:100%;align-items:flex-end">
<button class="kw-dial" type="button" aria-label="Close" aria-expanded="true"><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="M18 6 6 18M6 6l12 12"/></svg></button>
<div style="display:flex;flex-direction:column;align-items:flex-end;gap:8px" role="group" aria-label="Comments, quick note and account">
<button class="kw-dial__item" type="button"><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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><path d="M8 9h8M8 13h5"/></svg>Comments</button>
<button class="kw-dial__item" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 20h9M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4z"/></svg>Quick note</button>
<button class="kw-dial__item" type="button"><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="8" r="5"/><path d="M20 21a8 8 0 0 0-16 0"/></svg>Sign in</button>
</div>
</div>
- Named, keyboard reachable, and its menu is a Sheet.
- Dragging is optional; it also works where it rests.
Rules
- Never put more than one floating control on a phone screen.
- Must reserve
--k-fab-slotat the foot of phone pages.
AI readiness test
Task. Add a “quick note” action to the phone screenplay.
Give the agent. Floating dial, Phones pattern.
Constraint. No new floating buttons.
A reliable answer
- Adds an item to the existing dial’s sheet
- No second FAB