Clothes Rack

A shop rail of 3D garments that swivel to face you, with cloth that moves like fabric. Built with three. Optional fabric scans improve the knit and studio light.

Default

Point at a garment to face it; click for the detail view. Parent must have a size — the rack fills it.

Loading…

Installation

source.tsx

Usage

page.tsx
"use client"

import { ClothesRack } from "@/components/clothes-rack"

export default function Page() {
  return (
    <div className="h-[560px] w-full">
      <ClothesRack gap={6} />
    </div>
  )
}

Props

PropTypeDefaultDescription
itemsClothesRackItem[]defaultItemsGarments on the rail, in order.
gapnumber7Clear air between side-on garments, as % of body width.
restAnglenumber80Turn-away angle at rest, in degrees.
durationnumber0.25Seconds to turn and face you.
flownumber1How loose the cloth is (0 stiff … 2 very loose).
breezenumber0Idle draught along the rail (0–1).
rail"chrome" · "black" · "brass""chrome"Rail finish.
hanger"wood" · "black" · "chrome""wood"Hanger finish.
detailbooleantrueOpen the detail view on click / Enter.
texturesGarmentTextures—Optional jersey/fleece maps, heather grain, and studio HDR URLs.
classNamestring—Classes on the outer box (give it a size).