Loading preview
3D Cube
3DA CSS-only cube with six content faces that tumbles slowly and pauses on hover.
A large screen, tipped back in 3D, that swings upright as it scrolls into view.
npx shadcn@latest add @venusui/scroll-deviceRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/scroll-device.tsxThe code behind the preview above.
scroll-device-demo.tsx
import { ScrollDevice } from "@/components/ui/scroll-device"
export default function ScrollDeviceDemo() {
return (
<ScrollDevice className="w-full max-w-2xl">
<div className="flex size-full items-center justify-center bg-linear-to-br from-violet-500/30 to-sky-400/30">
<p className="text-xl font-semibold tracking-tight">Your product here</p>
</div>
</ScrollDevice>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What runs on the screen: a screenshot, a video or live UI. Required. |
| tilt | number | 38 | Starting tilt in degrees. |
Only the props above, plus className.
motion (the CLI installs it), React 19 and Tailwind CSS v4.object-cover.overflow-hidden so the tilted screen doesn’t cause sideways scrolling.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A CSS-only cube with six content faces that tumbles slowly and pauses on hover.
A tilted wall of vertically scrolling columns, for screenshots and showcases.
A card that tilts in 3D toward the pointer with spring physics.