Skip to the page
Tactile UI

Upgrade card

The card that stands where a plain “Upgrade your plan” modal would, on a usage or billing screen. The meter sits at full (“Limit reached”) with the count beside it, a Monthly / Yearly switch changes the price, and the price, one line on what the plan adds and two keys (Maybe later, Upgrade) sit under it as one group. The part counts a neutral unit the app names (credits here) and holds no figures of its own. Upgrade shows its progress on the key itself, and when the app says the payment went through the same card turns into the new plan: its name, the new limit on a meter, and a short receipt. Both faces share one footprint, so nothing around the card moves. There is no payment in the part; the app takes it and answers.

On this page
  1. Anatomy
  2. Variants
  3. States
  4. Props and options
  5. Usage notes
  6. Accessibility
  7. Related parts

Anatomy

The kit’s panel holding the token meter’s strip and status line (shown full and red, with no cut line), the plain segmented control, and the kit’s keys; the receipt is the receipt part’s own table on its paper tokens, set in a small slip. Words are in the kit sans; the numeric face is only the counter and the receipt’s figures, and the price is tabular sans. The slip and the keys use the key radius and the card’s corner is that plus the padding, so the corners are concentric. upgrade-card.css only stacks the two faces in one grid cell and sets the fade between them.

Variants

  • Limit reached · monthly
  • Limit reached · yearly
  • Upgraded · monthly
  • Upgraded · yearly, paid with a card

States

  • Limit reached
  • Upgraded

Props and options

NameKindDescription
plan · from-planattributeThe plan on offer and the plan now.
unitattributeWhat the app counts in. Used on the meter, the plan line, the receipt and the spoken line.
used · limitattributeUnits used this month and the plan’s units a month now (the demo.
new-limit · monthly · yearlyattributeThe Monthly / Yearly switch picks between them; Yearly says what it saves in words (“2 months free”) when twelve months cost more than the year.
alsoattributeA short extra for the line under the price.
currency · localeattributeHow money and dates are written.
paid-withattribute
upgradeCardPrice() · upgradeCardSaving() · upgradeCardNext() · upgradeCardSays() · upgradeCardHTML()functionThe price in words, the saving in words, the next charge date, the line a screen reader hears, and the drawn markup.

Usage notes

Switch Monthly and Yearly to change the price, then press Upgrade.

Accessibility

  • Keyboard: Tab goes to the switch (one stop, arrow keys between Monthly and Yearly), Maybe later, then Upgrade. While the payment is pending Upgrade keeps the focus (aria-busy and aria-disabled, never disabled), so it is not lost. When the card turns into the new plan, focus that was on Upgrade moves to the plan’s name, never to the top of the page.
  • Upgrade’s busy state is on the key itself: aria-busy, its word changing to Upgrading and a lamp blinking in it. The word and the lamp together say it, so colour is not the only sign.
  • One polite status line speaks for the card. The meter on the new plan does not speak a second time.
  • The limit is never only red: the words Limit reached are printed above it.
  • The face that is not shown is inert and hidden from a screen reader, so only one plan is ever read. The receipt is a table with a row for each line. Under reduced motion the faces swap with no fade and the lamp does not blink.

Token meter

How much of a model’s context a conversation has used, as a segmented meter with the limit printed at its end. The strip is the meter’s: dark glass, the unlit segments just visible. It is green while there is room, amber from a cut line near the limit and red once the count is over it. A line of words says the same in a sentence (“41k of 128k tokens”), and a small display carries the figures, so colour is never the only sign.

Receipt

The record of a payment, printed on a slip of thermal paper: who was paid, the receipt number, when and with what, the lines and the sums, any refunds, and a rubber stamp that says where it stands, Paid, Part refunded, Refunded, Due or Void, with a lamp beside the word. It is what an order page, a billing history or the screen after checkout keeps; the order summary prices an order before it is paid. Under the slip are Print (only the slip goes to the printer), Download when there is a file, and Copy number. The sums are the order summary’s own, in whole minor units, never floating point.

Segmented control

A row of keys in a tray with one pressed down: pick a view, a range or a mode and it applies at once. It is the kit’s selector without the lamps, with sizes, a full-width row and icon segments.

Dialog

A decision that must be made now: a native dialog with a question, one sentence of consequence, a way back and the act.