Book Spine Shelf

A shelf of generated book spines: the hovered book slides out while neighbours lean away, and choosing one swings its cover open on a hinge into a reading card with an optional ribbon. Arrow keys walk the shelf.

Try it: Hover the spines, click one to open its cover; use ←/→.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/book-spine-shelf.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/book-spine-shelf. You can also copy the source into components/ui/book-spine-shelf.tsx (view on GitHub).

Usage

import { BookSpineShelf } from '@/components/ui/book-spine-shelf'

Props

Component props
PropTypeDefaultNotes
booksShelfBook[]7 sample books{ id, title, author, blurb, height?, width?, hue?, badge?, pattern? }.
value / defaultValuestring—Controlled / uncontrolled open book id.
onValueChange(id: string) => void—Fires when a book is opened.
titlestring'On my shelf'Mono label above the shelf.
classNamestring—Extra classes merged onto the root.

Dependencies

  • motion
  • Mesh Project Cards

    Project cards headed by a living mesh gradient — drifting blurred blobs with film grain — and a status pill that pulses for live and in-progress work. Cards tilt toward the pointer with a travelling…

  • Flip Checkout Card

    Frosted payment card mirrors every keystroke, flips for the security code, and the checkout condenses into a receipt once paid.

  • Sticky Card Stack

    Project cards that pin one over the next like a deck being dealt — each card shrinks back and dims as the following one slides up over it, still peeking out by a few pixels. Scroll-driven with…

  • Gravity Expand Card

    Click expands with spring; collapse on second click/outside.

  • Feature Bento Grid

    An asymmetric grid of feature tiles with generated art. Hover or focus a tile: it lifts, a hairline light follows the pointer around its edge, the art drifts up and a call-to-action rises. CTAs stay…

  • Liquid Morph Card

    Border/blob morphs toward pointer.

See all 27 Cards components