Skip to content

Block 118 of 297

Course Catalog

Course listings with code, credits, terms offered and prerequisites, with each full description in an expandable panel.

Puck key
CourseCatalogBlock
Export
courseCatalogBlock
React component
<CourseCatalog />
Path
components/puck/course-catalog-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 department course list where each row shows the course code and credits in a narrow left column and the title, terms offered and prerequisites beside it. Full descriptions stay collapsed behind a toggle until a reader opens them. On phones the code and credits sit on one line above the title. It works for program pages that need a readable slice of the catalog.

  • A major or minor page listing its required and elective courses
  • A department page previewing next year's offerings
  • A certificate program page showing a short, fixed course sequence
Writing the content
  • Enter Terms offered separated by commas; each term becomes its own small tag.
  • Leave Prerequisites blank when there are none and the row reads "None" rather than disappearing.
  • Add a Description only when it adds detail beyond the title. Without one, the "Course description" toggle is not shown.
  • Credits of exactly 1 reads "1 credit"; any other value, including ranges like 1–4, reads "credits". The list holds up to 40 courses.
Accessibility
  • Course titles are headings one level below the block heading; when both are filled, the code is added to the heading as hidden text.
  • Terms and prerequisites use a description list, so each value is announced with its label (WCAG 1.3.1).
  • Descriptions use native details and summary, keyboard operable with a visible focus outline and a 44px minimum toggle height.
Customizing the code
  • Course codes, the eyebrow and links use Tailwind indigo; replace indigo- to rebrand.
  • The row grid is sm:grid-cols-5 with the code column at sm:col-span-1; widen it to sm:col-span-2 (and the text to sm:col-span-3) for long codes.

Editor fields

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

  • Eyebrowtext
  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Coursesarray
  • Footnotetextarea
  • Full catalog link texttext
  • Full catalog linktext