swift-simple is a simple calculator delivered as a single page. The product intent is narrow and complete: a person opens the page, enters numbers and arithmetic operators, sees the computed result displayed, and can clear the calculation to start over. The design brief frames the calculator as a precision instrument — the interface itself is the product, with an oversized tabular-numeral readout, a machined key grid, and one hot accent reserved for the equals key.
The audience is anyone with a browser who needs everyday arithmetic done quickly and correctly. There is no brand context, no account, and no multi-step workflow: one anonymous visitor, a few seconds, one calculation at a time. Credibility comes from precision, legibility, and speed rather than from marketing content.
swift-simple is a single-page web calculator. The current delivery consists of:
Actors:
Accepted behavior: entry of numbers and arithmetic operators, display of the computed result, and clearing the calculation to start over — all on one page, with no identity, no persistence, and no additional destinations.
Narrow exclusions: no accounts or sign-in, no saved or server-side calculation history, no multi-page navigation, no scientific or programmer calculator modes, no unit conversion, no currency data.
Removed from scope
The entire product is one anonymously reachable page. There is no identity establishment, no session continuity, and no protected state: a visitor lands on the Calculator page and can immediately enter numbers and operators, read the result, and clear the calculation. Nothing about the accepted behavior requires the application to know who the visitor is, to resume work across visits, or to bind a result to a participant, so no account, sign-in, or permission model is introduced.
The expression history shown on desktop (and its single-line mobile form) is a display of the current page session only. It is not persisted to the database and does not survive a reload as a product commitment. The provisioned FastAPI backend and MariaDB database remain part of the deployed system but carry no accepted calculator domain behavior in this document.
Everything described here is current. No future-horizon requirements have been accepted.
The single page of the product, anonymously reachable at the application root. It hosts the full calculator lifecycle: entry, display of the result, and clearing.
Information and state
clamp(44px, 9vw, 88px), tracking -0.03em, so digits occupy a fixed grid and never shift sideways as they grow.EXPRESSION above the readout.#8A8478 beneath the readout.+, −, ×, ÷) rendered as a small filled #141517 square with a white glyph, positioned at the active operator key, sliding between operator keys in 160ms.#141517 lines with 11px labels, documenting the supported keys.swift-simple in Space Grotesk at 500 weight, rotated -90° in the left margin beside a vertical 1px rule, visible only at ≥768px.#1E7A4C confirmation tick shown briefly when the calculation is cleared.Primary actions
+, −, ×, ÷) to set the pending operation; the operator chip moves to that key.=, tangerine #E8622C, spanning two rows) to commit the calculation and display the result.Supporting actions
., +, -, *, /, Enter/=, and Escape/C mirror the on-screen keys.Domain entities
Component responsibilities
clamp(16px, 2.4vw, 20px); the equals key spans two rows and is the only filled tangerine surface.States
0; expression line is blank; no operator chip is active; history is empty (desktop column shows no rows; mobile shows no recent line).0, expression line clears, operator chip disappears, and the green confirmation tick appears briefly.FR-1 — Enter numbers and arithmetic operators As a Calculator user I should enter numbers and arithmetic operators so that I can build an arithmetic expression.
+, −, ×, ÷) on the key grid, or typing the equivalent characters on a keyboard.FR-2 — See the computed result displayed As a Calculator user I should see the computed result displayed so that I know the outcome of my calculation.
Enter/= on the keyboard) with a complete expression.FR-3 — Clear the calculation to start over As a Calculator user I should clear the calculation so that I can start over with a fresh entry.
Escape/C on the keyboard).0, the expression line clears, the operator chip disappears, and a deep green #1E7A4C confirmation tick appears briefly.FR-4 — Review recent expressions As a Calculator user I should review my recent expressions so that I can see what I just calculated.
FR-5 — Use the keyboard As a Calculator user I should use my keyboard so that I can calculate without reaching for the pointer.
., +, -, *, /, Enter/=, Escape/C.Product context. An anonymous visitor with a browser who needs a quick piece of everyday arithmetic. They arrive with no account, no prior state, and no expectation beyond a working calculator; the page is the whole product.
Primary goal. Enter a short arithmetic expression and read a correct result in a few seconds, then either continue from that result or clear and start again.
Distinct responsibilities.
Inputs and decisions. Which operands and operator to enter; when the expression is complete enough to commit; whether to continue from the result or clear.
Interactions with other participants. None — the Calculator user is the only human participant. The application evaluates and renders; there is no counterparty, recipient, or approver.
Observable success. The result appears in the oversized tabular readout, the committed expression joins the history, and clearing returns the instrument to 0 with a green confirmation tick.
What makes this role distinct. The work is a single continuous instrument interaction — entry, commit, read, clear — with no handoff, no saved state, and no identity. The persona's entire value comes from speed and numerical legibility, not from managing records or coordinating with others.
0, the expression line is blank, and no operator chip is active.+, −, ×, or ÷); the operator chip becomes a filled #141517 square at that key, sliding into place in 160ms, and the operator appears in the expression line.Enter); the result replaces the readout in tabular numerals, a 200ms underline sweep runs across the equals key, and the committed expression and result are appended to the history (desktop column, or the single mobile line).Failure/recovery: if the user presses equals with a trailing operator or divides by zero, no result is committed; the readout keeps the last valid value and the expression line stays editable. The user corrects the expression or presses clear, which resets the instrument to 0 and shows the green confirmation tick.
Escape/C).0, the expression line clears, and the operator chip disappears.#1E7A4C confirmation tick appears briefly to confirm the cleared state.The visual language is Rasmus Andersson's "interface as the product": a warm paper ground, hairline borders, a strict 4/8-pt spacing scale, tabular numerals as ornament, and one hot non-blue accent. The calculator is the hero — no marketing headline, no subtext paragraph, no CTA button.
Colour tokens (light mode)
| Role | Hex | Use |
|---|---|---|
| Background | #F6F3EE | Warm paper ground filling the viewport |
| Surface | #FFFDF9 | The single calculator body |
| Text | #141517 | Graphite numerals, labels, operator chip fill |
| Primary | #E8622C | Tangerine — equals key and live operator chip only (~4% of pixels) |
| Accent | #1E7A4C | Deep green — cleared confirmation tick and focus ring on operator keys |
| Muted | #8A8478 | Labels, key sub-legend, memory strip, expression line |
| Hairline | #E4DDD1 | 1px borders, key separators, history rules, decorative grid |
No blue anywhere. The equals key is the only filled tangerine surface.
Typography
clamp(20px, 3vw, 26px); micro-labels uppercase 11px with +0.14em letterspacing.clamp(44px, 9vw, 88px).clamp(16px, 2.4vw, 20px); sub-legend 11px.Shape language. Compact engineered rectangles: 10px radius on keys, 16px on the calculator body. Nothing pill-shaped. Keys are separated by 1px hairlines rather than gaps, so the pad reads as one machined block. Focus rings are 2px #1E7A4C offset 2px and are never removed.
Layout. Single centred column, max-width 420px on mobile and 720px on desktop, on the warm paper ground with 64–96px top margin. On desktop the calculator shifts left of centre and a right column holds the live expression history (last 6 entries, tabular numerals, right-aligned, hairline-separated) plus a compact keyboard-shortcut legend. On mobile the history collapses to a single most-recent line above the display. Spacing follows 8, 16, 24, 32, 48, 64. No cards, no shadows, no floating rounded containers on gradients.
Imagery. No photography, illustration, or 3D. The imagery is the interface itself: tabular numerals, hairline rules, a schematic keyboard-shortcut diagram in 1px #141517 lines with 11px labels, and the operator chip as a small coloured token. Optional single decorative element: a faint 1px grid of 8px squares in #E4DDD1 behind the calculator, visible only at ≥1280px and cropped at the viewport edges.
Readability constraint. Headlines, the wordmark, labels, numbers, and controls stay entirely inside the viewport and their container at 375px, 768px, and 1280px, wrapping or scaling with clamp(...) to fit; no other element covers them. Decoration may be cropped or bled off edges but never covers readable text or controls.
The instrument is the hero. The first screen is the calculator itself, not a marketing page. An oversized JetBrains Mono result readout (44px mobile → 88px desktop, right-aligned, tabular figures) dominates the top of a single #FFFDF9 machined block on the warm #F6F3EE ground. Above it sits a small 11px uppercase EXPRESSION micro-label; beneath it, the live expression string in muted #8A8478. Below, a 4×5 key grid separated by hairlines, with the tangerine #E8622C equals key spanning two rows as the only saturated element in the frame. At desktop width, a vertical 1px rule and the wordmark swift-simple in Space Grotesk rotated -90° run up the left margin. There is no centred headline, no subtext paragraph, and no button — the instrument carries the page.
The signature moves that make this concept implementable and product-specific:
+ − × ÷ token as a small filled #141517 square with a white glyph — slides between operator keys in 160ms so the current operation is always legible.Interaction Model: Animated Motion Tempo: restrained Hero Dimensionality: flat
Landing Hero Motion Brief
#141517 operator chip between operator keys over 160ms; pressing equals commits the result, runs a single 200ms underline sweep across the equals key, and crossfades the new history row in over 180ms. The outcome is a legible, stable instrument state — never a decorative flourish.#F6F3EE ground; the #FFFDF9 calculator block with a 1px #E4DDD1 hairline and no shadow; EXPRESSION micro-label, 0 in oversized JetBrains Mono, blank expression line; the 4×5 hairline key grid with the tangerine equals key spanning two rows; at desktop, the vertical rule and rotated swift-simple wordmark in the left margin and the empty history column on the right.prefers-reduced-motion drops all transforms and the underline sweep, keeping only instant colour feedback on press; the history row appears without crossfade; the layout remains fully usable and static.#1E7A4C offset 2px and never removed; prefers-reduced-motion yields a usable static arrangement with instant colour feedback only.+, −, ×, ÷) with decimal entry; no scientific functions, memory registers, or unit conversion are in scope.#E8622C is reserved for the equals key and the live operator chip; deep green #1E7A4C appears only on the cleared confirmation tick and operator-key focus rings.#141517 square with a white glyph marking the active operator, which slides between operator keys.#FFFDF9 calculator surface with a 1px hairline border, no shadow, and a key grid separated by hairlines rather than gaps.
swiftsimple

swiftsimple
No comments yet. Be the first!