Contact Sheet - React Component | Kokonut UI
Contact Sheet
Pick from a shoot the way photographers do. Circle a frame in china marker, click again to strike it, and look through a loupe at the detail first.
Install with
Add the contact-sheet component from Kokonut UI to this project with npx shadcn@latest add https://kokonutui.com/r/contact-sheet.json, then show me how to use it.
Installation
Contact Sheet is a free, open-source React component in the Kokonut UI Media collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/contact-sheet.tsx, so the code is yours to change.
Or add it by hand: install its packages, then copy the source from the code above into components/kokonutui/contact-sheet.tsx.
npx shadcn@latest add @kokonutui/contact-sheet
npm install lucide-react motion
Usage
import ContactSheet from "@/components/kokonutui/contact-sheet";
export default function Example() {
return <ContactSheet />;
}
Props
frames:ContactFrame[]Defaultdemo dataperStrip:numberDefault4- Frames per strip.
firstFrame:numberDefault12- Printed on the film edge before each frame number.
title:stringDefault"Roll 14 · Lisbon"defaultMarks:Record<number, Mark>Default{ 1: "pick", 5: "reject", 8: "pick" }onExport:(picked: number[]) => voidclassName:string- Extra classes for the root element.
ContactFrame
src: requiredstring- A 3:2 image.
alt: requiredstringx:number- Where this frame sits in the shot, 0 to 1. Frames from one scene differ a little.
y:numberzoom:number- 1 shows the whole image.
Mark
type Mark = "pick" | "reject";
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react |
^0.556.0 |
npm, installed by the CLI |
motion |
^12.23.25 |
npm, installed by the CLI |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.