Blog · Gutenberg

Book Shelf block for WordPress

A visual reading list with a realistic bookshelf view, cards layout, or list — complete with ratings, reading status, and genre tags.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

A visual reading list with a realistic bookshelf view, cards layout, or list — complete with ratings, reading status, and genre tags.

Inspector panels on this block: Shelf Settings, Spine Size, Books (' + a.books.length +. Those titles come from index.js, not from a shared template.

Behavior controls: “Layout” options: Shelf (spines), Cards (covers), List; “Status” options: ✓ Read, ▶ Reading, ○ Want to read.

Where to find it

Gutenberg inserter → Blog → search “Book Shelf” (block name `blockenberg/book-shelf` in block.json). Style it in the sidebar after insert.

How to use Book Shelf block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Book Shelf”, insert it. Category: Blog.
  3. Configure inspector controls that exist on this block. Open Shelf Settings. Set “Shelf Settings — Title”, “Show title”, “Show rating”, “Show status”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Shelf Settings — TitleText field in the inspector. block.json default: My Reading List. Saved as `shelfTitle`.
Show titleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
LayoutSelect control; the chosen value is saved on the block. Options: Shelf (spines); Cards (covers); List. block.json default: shelf. Saved as `layout`.
Show ratingOn/off toggle in the inspector. On by default. Saved as `showRating`.
Show statusOn/off toggle in the inspector. On by default. Saved as `showStatus`.
Show genreOn/off toggle in the inspector. On by default. Saved as `showGenre`.
Show authorOn/off toggle in the inspector. On by default. Saved as `showAuthor`.
Show yearOn/off toggle in the inspector. On by default. Saved as `showYear`.
Spine width (px)Numeric range control in the inspector. Range 28–80. block.json default: 46. Saved as `spineWidth`.
Spine height (px)Numeric range control in the inspector. Range 80–320. block.json default: 190. Saved as `spineHeight`.
Border radiusNumeric range control in the inspector. Range 0–32. block.json default: 14. Saved as `borderRadius`.
Spine font sizeNumeric range control in the inspector. Range 8–18. block.json default: 11. Saved as `spineFontSize`.
Books (' + a.books.length + — TitleText field in the inspector. Saved as `books`.
AuthorText field in the inspector. Saved as `books`.
GenreText field in the inspector. Saved as `books`.
YearText field in the inspector. Saved as `books`.
StatusSelect control; the chosen value is saved on the block. Options: ✓ Read; ▶ Reading; ○ Want to read. Saved as `books`.
Rating (0–5)Numeric range control in the inspector. Range 0–5. Saved as `books`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Book Shelf block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Book Shelf”. It sits under Blog. After insert, open Shelf Settings and set “Shelf Settings — Title”, “Show title”, “Show rating”, “Show status”.

What makes Book Shelf different from other Blockenberg blocks?

A visual reading list with a realistic bookshelf view, cards layout, or list — complete with ratings, reading status, and genre tags. Inspector labels on this block include “Shelf Settings — Title”, “Show title”, “Show rating”, “Show status”.

Is the Book Shelf Gutenberg block free?

Yes. Book Shelf ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Book Shelf to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Shelf Settings, Spine Size, Books (' + a.books.length +).

Related blog blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Book Shelf from the Gutenberg inserter.

Get Blockenberg