Preview Rail

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/preview-rail

API Reference

items
PreviewRailItem[]
Default—
label?
string
Default—
orientation?
"vertical" | "horizontal"
Defaultvertical
activeId?
string
Default—
defaultActiveId?
string
Default—
onActiveChange?
((id: string) => void)
Default—
onItemSelect?
((item: PreviewRailItem) => void)
Default—
renderPreview?
((item: PreviewRailItem) => ReactNode)
Default—
showPreview?
boolean
Defaulttrue
previewSide?
"before" | "after"
Defaultafter
highlightActive?
boolean
Defaultfalse
itemSize?
number
Default24
className?
string
Default—
railClassName?
string
Default—
previewContainerClassName?
string
Default—
previewClassName?
string
Default—
labels?
Partial<{ label: string; }>

Override any built-in string.

Default—

Updated