Skip to content
Site volume
Colourway

Components

RulerReadout

The estimator's sticky readout: the band in numbers first, then a read-only ruler.

  • Beta
  • Reading layer
  • Server component
  • Since 0.1.0
  • Press check
Import from@maxgrits/overprint-react/ruler-readout
On this page

Example#

Look of this example

Your estimate

$3,200 to $4,800

Live render of examples/ruler-readout/basic.tsx

Usage#

Use the ruler readout to report a range the page has worked out, such as the estimator's price band. The numbers come first as visible text; the ruler underneath is a picture of where the band sits.

  • Read-only. It never takes input; to let people choose a value, use Slider.
  • Sticky. On the estimator it sits in a sticky plate, so the answer stays in view while the questions change it.
  • Format once. format prints both ends ("$3,200 to $4,800"); toLabel changes the joining word for other languages.

Anatomy#

Your estimate

$3,200 to $4,800

The parts of examples/ruler-readout/basic.tsx, numbered:
  1. LabelWhat the band is..mk-ruler-readout-label
  2. ValueBoth ends as text, in the numeral role..mk-ruler-readout-value
  3. RulerThe band between two end ticks; hidden from assistive tech..mk-ruler-readout-ruler

Volume#

Reading layer: identical at every volume.

  • Quiet

    Your estimate

    $3,200 to $4,800

    Docs, forms, legal and long reads. Flat inks, no art in motion.

  • Studio

    Your estimate

    $3,200 to $4,800

    The site default. Art on its own plates, one display moment per view.

  • Press

    Your estimate

    $3,200 to $4,800

    Hero moments, covers and campaigns. Halftone fields and the second ink.

  • Rave

    Your estimate

    $3,200 to $4,800

    Launches, posters and the 404. Every ink, and the words still win.

Content#

  • Say what the band is in the label: "Your estimate", not "Range".
  • Write both ends in full with the currency: "$3,200 to $4,800".
  • If the band is an estimate, say so nearby in words; the ruler never carries a caveat by itself.

Do and don't#

Do

Your estimate

$3,200 to $4,800

Real figures, both ends.

Don't

Somewhere in the low thousands.

A joke where the price should be.

Prices are in the literal zone (D-I2). The joke can sit beside the readout; the numbers themselves stay exact.

Accessibility#

  • The numbers are text; the ruler drawing is hidden from assistive tech.
  • Prices stay literal.
KeysWhat happens
(none)Not interactive

The colour pairs it prints, with their contrast on both papers:

TextSurfaceRoleBoneNight
--mk-text--mk-surfaceuinot in this looknot in this look
--mk-text-2--mk-surfaceuinot in this looknot in this look

Process at Studio, normal contrast. Every look: the press check.

Props#

PropTypeDefaultDescription
min requirednumbernone
max requirednumbernone
value requirednumber | readonly [number, number]noneOne value, or the band `[lo, hi]`.
marksreadonly SliderMark[]none
format((value: number) => string)none
toLabelstring"to"Joins the band's ends (default "to").
labelstringnoneAn optional caption above the numbers, e.g. "Your estimate".

Plus 279 React and DOM attributes passed through to the root element (className, ref, aria-*, event handlers and the rest). Generated from RulerReadoutProps in packages/overprint-react/src/reading/ruler-readout/ruler-readout.tsx.

Tokens#

Changelog#

Arrived in 0.1.0.

0.1.024 October 2026

  • MinorreactThe reading layer's controls, overlays, forms and visitor prefs (P2-T1 to P2-T5): every Button is the comic hit key, with IconButton, Link and Tooltip; Input, Textarea, Select, Checkbox and CheckboxGroup, Radio and RadioGroup, Switch, Slider with the ruler, RulerReadout and SegmentedControl; Dialog, Drawer, NavSheet, Tabs, Disclosure, Faq and faqJsonLd on Base UI 1.9 where the platform falls short; Field, Fieldset, Form with the site's inline validation, ErrorSummary, Callout, Honeypot, FormTimestamp and QuoteForm; PrefsScript under 1 KB, usePref and setPref with cross-tab sync, ThemeToggle and the visitor VolumeDial; VisuallyHidden.