Block 199 of 297
Bus Routes
School bus routes with schools served, first pickup and expandable stop lists, plus a stop finder and transportation contact.
- Puck key
- BusRoutesBlock
- Export
- busRoutesBlock
- React component
- <BusRoutes />
- Path
- components/puck/bus-routes-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 list of school bus routes, each a card with a route number tile, the schools it serves and the first pickup time, and every stop in order inside a show/hide panel. A bad-weather note and the transportation office card sit in a right-hand column on desktop. On phones that column moves below the routes.
- A district transportation page listing every route
- A school page showing only the routes that serve that building
- A start-of-year page for families checking pickup times
Writing the content
- Enter Stops one per line, in order, as time | place, for example "6:52 a.m. | Maple Street and 3rd Avenue". A line without a | shows the place with no time.
- Keep Route number to the number or code ("12" or "7A"); the block adds the word "Route" in the tile.
- Separate Schools served with commas. It becomes the card heading, so a route with no schools listed reads "Schools to be announced".
Accessibility
- Stop lists use native details and summary elements, so they open with Enter or Space and announce their expanded state without extra scripting (WCAG 2.1.1, 4.1.2).
- Each toggle reads as "Show all 5 stops on route 4", and each card heading starts with a hidden "Route 4:", so screen reader users can tell routes apart.
- Stops are an ordered list in pickup order, and the timeline dots and connecting lines are hidden from assistive technology (WCAG 1.3.1).
Customizing the code
- The route tile is bg-indigo-700 and the stop dots use ring-indigo-600; change the indigo- classes to match your fleet or district color.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Stop lookup link texttext
- Stop lookup linktext
- Routesarray
- Bad weather notetextarea
- Office nametext
- Office hourstext
- Office phonetext
- Office emailtext