Data

Product preview.

A crisp product frame with a caption and explicit actions.

LIVE PREVIEWTry it. It works.

Install the source

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/product-preview.json

Registry setup · Examples · API and behavior · Open the playground

COMPLETE EXAMPLES

Use it in context.

Each example includes its imports, data and state. The preview runs that same source. Include the stylesheet once in your application.

A product frame with a working detail action

Show a compact interface without screenshots, hidden hover content or decorative browser controls that appear clickable.

Keyboard

  • Open review details launches a real dialog. Escape returns to its trigger.

States covered

  • semantic caption
  • responsive frame
  • explicit dialog action
  • crisp local interface
  • reduced motion

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-product-preview-workflow.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import {Button,Dialog,DialogClose,ProductPreview,UIProvider} from '@bld8/ui';
export default function ReviewPreview(){return <UIProvider><ProductPreview title="Review space" description="A compact example for a product page or release note." address="workspace / review" actions={<Dialog title="Review details" description="An example action connected to real interface state." trigger={<Button size="sm" variant="secondary">Open review details</Button>}><p>Keyboard review and spacing checks are ready to inspect.</p><DialogClose>Back to preview</DialogClose></Dialog>}><div style={{padding:24,background:'var(--bui-bg)'}}><div style={{display:'flex',alignItems:'center',justifyContent:'space-between',gap:12,marginBottom:24}}><strong>Interface review</strong><span style={{padding:'5px 8px',background:'var(--bui-selected-bg)',borderRadius:4,fontSize:12}}>3 ready</span></div>{['Keyboard paths','Field alignment','Save recovery'].map((title,index)=><div key={title} style={{display:'flex',gap:12,alignItems:'center',paddingBlock:14,borderTop:'1px solid var(--bui-line)'}}><span style={{width:8,height:8,borderRadius:'50%',background:index===0?'var(--bui-accent)':'var(--bui-muted)'}} aria-hidden="true"/><span>{title}</span></div>)}</div></ProductPreview></UIProvider>;}

Quick reference

React / TypeScript
<ProductPreview title="Workspace">{preview}</ProductPreview>

In the workspace or ZIP starter, import components from @bld8/ui and include @bld8/ui/styles.css once. Registry installations use your local bld8/ source path. Wrap overlays in UIProvider.

API & behaviour

Static content or a labelled lazy image fits a bounded frame. Captions and actions remain available without hover. It does not embed or execute a remote application.

ProductPreview

ProductPreview public properties
PropTypeDefault
titleRequiredstring—
actionsReactNode—
addressstring | undefined—
aspectRationumber | undefined1.6
childrenReactNode—
classNamestring | undefined—
descriptionstring | undefined—
image{ src: string; alt: string; } | undefined—

ProductPreviewProps

ProductPreviewProps public properties
PropTypeDefault
titleRequiredstring—
actionsReactNode—
addressstring | undefined—
aspectRationumber | undefined—
childrenReactNode—
classNamestring | undefined—
descriptionstring | undefined—
image{ src: string; alt: string; } | undefined—

Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.

Related controls

Notes to self

Test this component with real content, keyboard input and both themes. The example is a starting point; labels, error handling and behaviour still need to fit the application.