Travel policy written as chips

A policy written as one large sentence whose numbers are buttons: tap one and it rolls to the next value and rewrites the worked example underneath.

FeaturesFreeFrom Spoor, Europe experienceAbout 5k tokens saved
The whole page

Links in the preview stay on the block.

Open on its own

The prompt

One prompt, written to stand on its own: goal, structure, type, colour, spacing, behaviour and the words in square brackets to replace. Paste it into any tool that writes HTML. The Code tab has this block as one file.

772 words
Download .zip
# Travel policy written as chips

One features section, not a whole page: build it to drop into a page that already exists. Works in Claude, v0, Lovable, Bolt, Cursor or any tool that writes HTML.

## Goal
A features section turning a written rule into something you can change in place: one big sentence whose variables are buttons, with a worked example underneath that updates as you tap. For a travel or expenses product.

## Structure
1. Section labelled by its heading.
2. Twelve column row, text left, photo right.
3. Short heading.
4. Large paragraph holding the policy, four inline buttons set into it as chips.
5. Each chip holds a clipped box with the current value.
6. Worked line under it, its result in a heavier weight.
7. Photo figure at 3:2, right hand columns.

## Type
One family: Excon (Fontshare) at 400 and 500, ui-sans-serif behind it. Body 400, 18px/1.5. Heading 500, clamp(40px,5.2vw,80px)/1, -.03em. Policy 400, clamp(28px,2.7vw,42px)/1.55, -.015em, 15em. A chip inherits that size at 500 with -.01em, so it sits in the line rather than on it. Worked line 16px, 36em, result at 500.

## Colour
Ground #EEF0F2, panel and chip face #FFFFFF, ink #0C1626 for heading, policy and the worked result, worked line #5B6575. Chip text #2443D6 with a #D3D8DE border at rest; on hover or focus the border turns #2443D6 and the fill wipes to #2443D6 with #FFFFFF on it; pressed keeps those colours. Focus ring 2px #2443D6, 3px offset. AA: #5B6575 on ground, #2443D6 on white, #FFFFFF on #2443D6.

## Spacing and lines
Section padding clamp(120px,16vw,240px) top and bottom. Container 1312px plus two gutters of clamp(20px,4.45vw,64px). Twelve columns, 24px column gap, vertically centred. Text columns 1 to 6, photo 8 to 12, 10px radius. Policy clamp(32px,4vw,56px) under the heading, worked line clamp(24px,3vw,36px) under the policy. A chip is 1.3em tall, .32em side padding, 1px border, .26em radius.

## Behaviour
A script is needed. Each chip holds its values and the index showing. Click, Enter or Space steps the index on and wraps. The new value is appended as a second span in the clipped box: the old one moves up by its own height, the new arrives from below, both .36s cubic-bezier(.7,0,.2,1), the old one removed on landing. The script then rewrites the chip label as label, value, unit, Change, and recomputes the worked sentence. Hover and focus wipe the fill in from the left over .55s cubic-bezier(.7,0,.2,1), colour following over .45s; press scales .97 over .2s. Entrances: heading, paragraph, worked line and photo rise 20px and fade .7s cubic-bezier(.2,.7,.2,1) at 12 percent in view. Reduced motion skips entrances and swaps values without the roll.

## Responsive
At 999px the row becomes a plain block: text full width, policy losing its 15em cap, photo 56px below. At 640px the policy fixes at 30px/1.6 and the chips grow to 1.42em so the taller line does not clip them.

## Accessibility
Every chip is a real button whose label reads as a sentence ending in the word Change, rewritten after each tap. The worked line is a polite live region, so the result is announced once. Pad each chip's hit area out to 44px.

## Built values (from code.html)
- Fonts: Excon 400, 500 (Fontshare).
- Colour variables: --ground #EEF0F2, --panel #FFFFFF, --ink #0C1626, --muted #5B6575, --line #D3D8DE, --cobalt #2443D6, --signal #FFC400, --muted-n #9AA6B8, --off #A7AFBA.
- Size variables: --nav 56px, --g clamp(20px,4.45vw,64px), --max 1312px, --pad clamp(120px,16vw,240px).
- Media queries: max-width 999px, max-width 640px.
- Media: assets/table.webp (1400x933).
- Script: yes, a small inline script.

## Content to replace
- [Heading]: Three or four words on setting the rule once.
- [Policy]: Two or three rules as one paragraph, four values as chips.
- [Chip values]: Four lists of three to five options, in stepping order.
- [Chip labels]: A short phrase per chip, plus a unit where there is one.
- [Worked line]: One worked example, fixed input, computed result.
- [Photo]: Someone working while travelling, 3:2.

## Rules
Plain, specific copy that reads as a live product; never the word sample. No shadows, glow, glass, blur, gradient text, emoji or italics. Motion moves transform and opacity, with colour, border, height and stroke transitions on state changes, and holds its end state under prefers-reduced-motion. Text passes WCAG AA.

## Output
Return the block in one piece: the markup, one style block with the web fonts imported on its first line, and a small script only if the behaviour needs one. No page wrapper, no framework, no build step. Prefix every class with `blk-` and put the colours and sizes in CSS variables at the top.

Media to supply

The photos and video on the live page are licensed for this showcase, so the code points at an assets folder instead. Drop your own files in with these names, or change the paths: table.webp

More like this

Features

Every features block

Same page

More from Spoor

See the page