Page Content:

Book Tiles

Overview

Book Tiles renders a grid of OpenStax book covers, each with a title link, an optional overlay badge, and a per-book “Get the book” dropdown menu. The cover image and title are loaded from OpenStax book data by UUID, so you only configure each book's id and its link destinations.

This block ships in @openstax/flex-page-os-blocks rather than the generic renderer, because it is coupled to OpenStax book data.

Config

Book Tiles takes a default dropdown button label and a list of books to display. Each book is identified by its CNX UUID — used to load the cover image and title — and configures its own link destinations and badge.

The options

button_text: the dropdown button label, for example “Get the book”. Set it on the block as the default for every tile; a per-book value overrides it, and also serves as the disabled label when a book has no menu (the “Coming soon” book below).

id: a book's CNX UUID, used to load its cover and title.

title_link: where a book's cover and title link to.

badge / badge_alt: an optional overlay image and its alt text. In production the CMS supplies the badge per book — here College Success shows the “Available in Assignable” badge.

menu: dropdown sections of links for a book. Each item is a dynamic link target — external URLs render as links, while action targets (like “Order a print copy” below) defer to a handler the host app registers, in this example the demo alert action. Sections are kept as separate groups so dividers can render once the shared dropdown supports them; today they are flattened into one menu.

Examples

Three books: two available (with full dropdown menus) and one coming soon (no menu, so its button is disabled and relabeled per book).