Expense form
The composer is the core of Settld. "Log a โน4,200 dinner in 5 seconds" is not a tagline โ it's the spec. Five rows, frosted glass, a coral margin rule down the left. Every row is a self-contained decision: where, how much, who, how to split.
Composed view
The composer is a frosted glass card โ backdrop-filter: blur(16px) saturate(1.1) โ placed against a warm surface so the blur has material to work with. On a white background it's invisible; always layer it over the canvas or a section bg.
The coral margin rule is a 1px vertical line at left: 56px โ the exact width of the icon column. It runs the full height of the card with opacity: 0.22. This is the khata ledger aesthetic: a physical notebook margin, not a UI chrome element.
Row anatomy
--ink-mute). No thousands separators while typing โ add them on blur. The amount field is the row; no extra chrome around it. Tapping anywhere in the row focuses the field.
--teal-pale fill + --teal border and text. Unselected chips are paper with hairline border. The "You" chip is always first and always selected โ it cannot be removed. Chip tap toggles inclusion; if a chip is deselected, re-run the split calculation.
Split modes
Dashed dividers
Between-row dividers use border-bottom: 1px dashed var(--ink-line). Dashed, not solid. This is intentional โ it's the ledger / khata language, not a separator. Solid dividers would feel like a table; dashed dividers feel like ruled paper with content waiting to be filled in.
The only solid border in the composer is the outer card border and the submit row's top separator. Everything internal is dashed.
Empty and error states
Empty state: the Add expense button is disabled until both a description and a non-zero amount are present. Don't show red states before the user has tried to submit โ validate on submit, not on blur, for the first interaction. After a failed submit, switch to on-change validation.
Validation errors use coral border on the entire card (not per-field outlines) and a coral error message in the label position. The button switches to coral fill โ it's still tappable, but the error is visible. Never block the submit button silently; if there's an error, show it at the same moment you block submission.
Usage
Code
Composer shell
<!-- Glass card shell โ always on a non-white bg --> <div class="composer"> <!-- Each row: icon-column + field --> <div class="composer-row"> <div class="composer-icon">๐</div> <div class="composer-field"> <div class="composer-label">Where</div> <input class="composer-value" placeholder="What was this for?"> </div> </div> <!-- Amount row --> <div class="composer-row"> <div class="composer-icon">โน</div> <div class="composer-field"> <div class="composer-label">Amount</div> <div class="composer-amount"> <span class="currency">โน</span> <input type="number" inputmode="decimal" value="0"> </div> </div> </div> </div>
Design tokens used
| Token | Value | Role in composer |
|---|---|---|
--glass-bg | rgba(251,248,240,0.72) | Card background |
--glass-border | rgba(255,255,255,0.55) | Card border |
--r-xl | 28px | Card corner radius |
--coral | #E76F51 | Margin rule, error state |
--ink-line | #DDD2B8 | Dashed row dividers |
--teal-pale | #D6EAE2 | Selected chip fill |
--s-deep | #E8DEC5 | Segmented control track |
--d-slow | 420ms | Split bar transition |
--ease-spring | cubic-bezier(0.34,1.56,0.64,1) | Split bar easing |