# Film proof

Compare three film stocks on the same landscape and check the framing with a thirds grid.

[View Film proof on CyberSpec](https://www.cyberspec.dev/sink/photo-proof)

## Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/photo-proof.json
```

## Usage

```tsx
import { Cyber } from "@/components/ui/cyber"
import Recipe from "@/components/recipes/photo-proof"

export default function App() {
  return (
    <Cyber>
      <Recipe />
    </Cyber>
  )
}
```

## Source

```tsx
"use client"

import "./recipe-layout.css"
import { useState } from "react"
import { Corners } from "@/components/ui/micro"
import { SegmentedControl } from "@/components/ui/segmented-control"
import { Switch } from "@/components/ui/switch"

const stocks = {
  Dusk: ["#ffcca0", "#ea7d89", "#575077", "#24233d"],
  Chrome: ["#ccfffd", "#87c8cc", "#596d9c", "#1a3248"],
  Mono: ["#f2eee4", "#b6b2a8", "#666766", "#282c2c"],
}
type Stock = keyof typeof stocks

export default function PhotoProof() {
  const [stock, setStock] = useState<Stock>("Dusk")
  const [grid, setGrid] = useState(false)
  const [sun, sky, ridge, shadow] = stocks[stock]

  return (
    <div className="sink-stack">
      <div role="img" aria-label={`Two mountain ridges at sunset, printed on ${stock} stock${grid ? " with a thirds grid" : ""}`} style={{ position: "relative", overflow: "hidden", height: 140, background: `radial-gradient(circle at 68% 36%, ${sun} 0 14px, transparent 15px), linear-gradient(180deg, ${ridge}, ${sky} 78%, ${sun})` }}>
        <div style={{ position: "absolute", inset: 0, background: ridge, clipPath: "polygon(0 81%, 15% 60%, 24% 67%, 41% 33%, 55% 57%, 67% 46%, 81% 65%, 100% 41%, 100% 100%, 0 100%)" }} />
        <div style={{ position: "absolute", inset: 0, background: shadow, clipPath: "polygon(0 69%, 11% 77%, 19% 73%, 33% 91%, 53% 66%, 61% 73%, 78% 48%, 94% 69%, 100% 64%, 100% 100%, 0 100%)" }} />
        {grid && <div style={{ position: "absolute", inset: 0, backgroundImage: "linear-gradient(to right, #fff9 1px, transparent 1px), linear-gradient(to bottom, #fff9 1px, transparent 1px)", backgroundSize: "33.333% 33.333%" }} />}
        <Corners size={9} inset={6} style={{ color: "white" }} />
      </div>
      <SegmentedControl<Stock> label="Film stock" options={["Dusk", "Chrome", "Mono"]} value={stock} onValueChange={(next) => next && setStock(next)} fill />
      <Switch label="Composition grid" checked={grid} onCheckedChange={setGrid} />
    </div>
  )
}
```

## Components in this recipe

- [Segmented control](https://www.cyberspec.dev/components/sidebar/segmented-control.md) — A row of segments with an indicator that slides to the choice.
- [Switch](https://www.cyberspec.dev/components/sidebar/switch.md) — A block that slides across a cut track and lights, with its state printed beside it.
- [Micro-print](https://www.cyberspec.dev/components/sidebar/micro.md) — The printed decoration around frames: micro-print lines, barcodes, rulers, data streams and corner brackets.

## Resources

- [All kitchen sink recipes](https://www.cyberspec.dev/sink.md)
- [Recipe source on GitHub](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/recipes/photo-proof.tsx)
- [Recipe layout stylesheet](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/recipes/recipe-layout.css)
- [Shadcn registry item](https://www.cyberspec.dev/r/photo-proof.json)
