1 slot open this monthBy the makers of shadcnregistryWe built shadcnregistry. Now we build your product.Book a callCheck availability
1 slot open this monthAI features?We build AI features into your product.Book a callCheck availability
1 slot open this month๐Ÿšจ Slop police๐Ÿšจ Slop police: we clean up vibe-coded apps.Report itReport your app
shadcnregistry
shadcnregistry
RegistryHealthInspect
Terms of ServicePrivacy Policy
  1. Registries
  2. mangacn
  3. Reader Strip

Reader Strip

component

A vertical strip of page images for scroll (webtoon) reading, centred, full width on phones and at most 720px (or the widest page) on desktop. It follows the page scroll or the nearest scroll parent: no inner scroll box. Each page is a <figure> with a lazy <img> whose width and height reserve the space (no jump), with an optional srcSet of smaller files (never shown wider than its width), framed by a 2px ink line unless gap is "none". Page states: loading = a paper panel of the page's ratio with a tone frame and the kit Spinner (G7); error = an accent edge-jagged panel with a "!" and a Retry button (G8) that asks the image again; loaded = the art pops in (G5). After the last page, an end panel (3px frame, SFX "END", brush mark-check, "To be continued"), announced to screen readers when reached. Reports progress (0-1) and the page being read, by the reading line of ReadingProgress: the last page whose top has crossed a line a third of the way down the visible view, under the sticky header (found on its own), page 1 until page 2 crosses it and the last page once the strip's bottom is in view, with a requestAnimationFrame-throttled scroll listener, cleaned up on unmount. Exports ReaderStrip, ReaderPage (one page, with a status prop to freeze a state) and ReaderEnd (the end panel).

pnpm dlx shadcn@latest add "https://mangacn.romain-sonnet.fr/r/reader-strip.json"
Premium blocks for shadcn/uiShadcnblocks.com ยท AffiliateExplore
  • cn
@components/manga/reader-strip.tsx