animui
ComponentsBlocksDocsPackageTry the demo
Introduction
Installation
Theming
Motion
AI guide
Changelog
Metrics dashboard
KPI drilldown
Metric explorer
Revenue explorer
MRR waterfall
Cohort retention
Usage forecast
Journey flow
Choropleth explorer
Connected scatter
Market terminal
Budget variance
Small multiples
Line replay
AI chat
AI composer
Agent run
AI side panel
SidebarPro4
Page header
Command palette
Notification center
Empty states
Search resultsPro
Login and sign up5
OTP input
Multi-step formPro
Settings page
Settings command
Security settings
Billing overview
Usage billing
Cancel flow
Team members
Invite people
Team directory
Roles and permissions
API keys
Webhooks
Integrations
Environment variables
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Invoice studio
Wallet card
Product listing
Product detail
Inbox triage
Support conversation
Support widget
Help centerNew
File upload
Media playerPro
Week calendar
Availability picker
Project board
Release readiness
Kanban boardNew
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrain
Revenue globe
Customer galaxy
Semantic zoom
Layout morph
What’s new8 new
BlocksProduct detail

Product detailPro

A product page with a swipeable gallery, finish and size variants, add to bag that confirms in place, shipping, a reviews summary, and details.

Live block · sample data

When to use

  • Product pages with a few variants, a gallery, and reviews.
  • Stores that want stock aware variants with a restock alert instead of a dead button.

When not to use

  • Products built from many options with live pricing; use product-configurator.
  • Browsing many products; use product-listing.

Installation

Install animui once, then import any component or block from its typed package entry.

animui · 250 components and blocks

React 19 and React DOM 19 are required. The package includes Free and Pro entries, styles and TypeScript declarations.

npm install https://animui.stracture.net/__local/package.tgz

Load the stylesheet once at your app root, then use the typed component import:

import 'animui/styles.css';
import { ProductDetail } from 'animui/product-detail';

Read the Code tab for the implementation files and the API reference below for required props.

Download animui 0.3.0 · Agent guide

Usage

Use this as the product page of a store. Pass the product with its finishes, sizes and stock, return your cart request from onAddToCart, and send back in stock alerts through onNotify.

example.tsx
1import { ProductDetail } from "animui/product-detail";2 3export function ProductPage({ product }) {4  return (5    <ProductDetail6      product={product}7      onAddToCart={selection => fetch("/api/cart", { method: "POST", body: JSON.stringify(selection) })}8      onNotify={selection => subscribeRestock(selection)}9    />10  );11}
Built fromCarouselRadio groupNumber fieldAccordionButton

API reference

2 parts. The first is the root.

ProductDetail

A product page with a swipeable gallery and thumbnails, finish and size variants, a quantity stepper, add to bag that confirms in place, shipping promises, a reviews summary, and a details accordion.

PropTypeDefaultDescription
productDetailProductsample lampThe product with finishes, sizes, reviews, shipping lines, and detail sections.
defaultFinishstringfirst finishInitial finish id.
defaultSizestringfirst sizeInitial size id.
onAddToCart(selection: DetailSelection) => void | Promise<void>–Adds the selection. Return a promise to show Adding until it settles; a rejection shows Try again. Without it the preview simulates a short request.
onNotify(selection) => void–Called when someone asks to be told when a sold out finish and size is back.
onWishlistChange(saved: boolean) => void–Called when the heart is toggled.
defaultCartCountnumber0Items already in the bag.
maxQuantitynumber9Upper bound of the stepper.
currency, localestring"USD", "en-US"Price formatting.
classNamestring–Extra class on the root.

DetailProduct

PropTypeDefaultDescription
id, name, collection, summaryRequiredstring–Identity, breadcrumb collection, and a one or two sentence summary.
finishesRequired{ id, name, swatch, images }[]–Each finish has its own photos; switching finish crossfades the gallery in place.
sizesRequired{ id, name, price, note?, soldOutIn? }[]–Price per size. soldOutIn lists finish ids in which the size is out of stock.
rating, reviewCount, distributionRequirednumber, number, [5 numbers]–Average, total, and counts for 5 to 1 stars.
shippingRequired{ title, text }[]–Delivery, returns, and warranty lines.
sectionsRequired{ id, title, body }[]–Accordion sections. The first opens by default.

Keyboard interactions

Arrow leftorArrow right
On the gallery, show the previous or next photo. In the finish and size groups, move the selection.
Tab
Move from the gallery to thumbnails, variants, the stepper, add to bag, and the accordion.
EnterorSpace
Choose a thumbnail, toggle an accordion section, or add to bag.

Accessibility

  • The gallery is a labelled carousel region with slide groups; hidden slides are aria-hidden and the counter is live.
  • Finish and size are radiogroups with roving tab stops, like native radios. Sold out sizes stay selectable and say Sold out in text.
  • Add to bag reports aria-busy while adding and announces the result; failures show Try again on the button itself.
  • Accordion buttons sit in headings with aria-expanded and aria-controls.
  • Review bars are hidden from assistive technology and each row carries a text label with its count.

Motion

  • The gallery follows the pointer 1:1, rubber-bands at the ends, projects the flick with momentum, and hands the release velocity to the spring.
  • Changing finish crossfades each photo in place; the thumbnail ring slides between thumbnails.
  • The price rolls when size changes. Add to bag morphs through Adding and Added to bag without changing width while the bag icon tilts and its count rolls.
  • Review bars fill once when they scroll into view; accordion sections open on a critically damped height spring.
  • Reduced motion jumps the gallery, removes travel and blur, and shows final bar widths.

Responsive behavior

  • Above 980px the gallery sticks beside the info column; from 680px to 980px both columns share the width equally.
  • Below 680px everything stacks: a square gallery with a four up thumbnail row, then the info.
  • Under 420px the reviews summary stacks above the bars. Gallery arrows appear on hover only; touch uses swipe.

Performance

  • The gallery drags one track with a motion value; only transform changes during a swipe.
  • The first photo uses priority loading; the rest load lazily at the gallery's size.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Use as the main product page. Put finish specific photos on each finish so the gallery always matches the chosen swatch.
  • Return your cart request from onAddToCart so the button shows real pending and error states.
  • Keep sections to three or four; long policies belong on their own page.
/components/blocks/product-detail/markdown

The full library index for assistants is at /llms.txt.

Related

Product listingProBlockA storefront grid with price, color and size filters, a sort menu, hover photo swaps, and quick add with a size row.Cart drawerProBlockProducts fly into the cart, counts roll, and a drawer handles quantities, shipping progress, and checkout.
PreviousProduct listingNextHelp center
animui · 84 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown
ShopLightingArch ceramic lamp
01234567890
A sculptural ceramic lamp with a linen shade on a walnut sideboard
A bright living room with timber beams, arched windows, and cream sofas
A home office with a wooden desk and deep green walls
Two stacked speckled ceramic bowls against a dark wall
01234567891/4

Arch ceramic lamp

$012345678901234567890123456789$1804.7(128)

A hand thrown stoneware base under a washed linen shade. Warm, even light for a side table or a sideboard.

Finish Clay

Size 38 cm tall

01234567891
  • Free deliveryArrives Sep 30 to Oct 2
  • 30 day returnsFree pickup from your door
  • Two year warrantyCovers the wiring and the base
4.7128 reviews
  • 598
  • 420
  • 36
  • 23
  • 11

Each base is thrown and glazed by hand in Porto, so the glaze pools a little differently on every lamp.

Dimmable E27 socket, 2 m braided cable with an inline switch.