Skip to content

Block 110 of 297

Tuition Breakdown

Cost-of-attendance table comparing two rates, with computed totals and a net price calculator link.

Puck key
TuitionBreakdownBlock
Export
tuitionBreakdownBlock
React component
<TuitionBreakdown />
Path
components/puck/tuition-breakdown-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A cost-of-attendance table comparing two rates, in-state and out-of-state by default, with a total row that adds itself up. The heading, intro and a dark net price panel sit to the left on desktop. On phones the panel comes first and the table scrolls sideways if needed.

  • Tuition and fees pages for public universities
  • Comparing on-campus and online rates, or full-time and part-time
  • Program pages that need a clear annual cost estimate
Writing the content
  • Type amounts as they should appear, such as $9,840. Any digits are added into the total, so text-only values like "Varies" are skipped.
  • Use the total overrides only when the true total differs from the row sum. A blank Total row label drops the row.
  • Rename the two column labels to fit your comparison; up to 16 cost rows fit.
  • Write the Table caption as a full description including the year, and use Badge to mark figures as estimated.
Accessibility
  • This is a real table with a caption, column headers and row headers (scope="col" and scope="row"), so screen readers can announce the item and rate for each amount (WCAG 1.3.1).
  • The scroll wrapper is a focusable region labelled by the caption, with a focus outline, so keyboard users can scroll it.
  • The empty top-left header cell has hidden "Cost item" text so the first column is still named.
Customizing the code
  • Totals are formatted by the currency Intl.NumberFormat at the top (USD, no cents). Change the locale or currency there.
  • The intro column is lg:col-span-4 and the table lg:col-span-8; the net price panel is bg-neutral-950.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Badgetext
  • Table captiontext
  • First column labeltext
  • Second column labeltext
  • Cost rowsarray
  • Total row labeltext
  • First column total (override)text
  • Second column total (override)text
  • Footnotetextarea
  • Net price texttextarea
  • Net price link texttext
  • Net price linktext