# Banknote Bento

> Vintage engravings rendered as ink-on-paper banknote duotones with serif captions, plus a thermal-camera card whose heat boundary rises over the artwork and types its caption.

<demo-banknote-bento>



</demo-banknote-bento>

## Installation

```bash
npx shadcn-vue@latest add "https://nxui.geoql.in/r/banknote-bento.json"
```

## Usage

```vue
<script setup lang="ts">
  import BanknoteBento from '~/components/ui/banknote-bento/BanknoteBento.vue';

  // Engravings must be CORS-readable for the thermal card (canvas pixels).
  const items = [
    {
      src: '/engravings/portrait.jpg',
      caption: 'the future of banking, with no fees.',
      ink: '#5b21b6',
      span: 'wide',
      storeBadge: true,
      focus: '50% 34%',
      zoom: 2.4,
    },
    {
      src: '/engravings/deluge.jpg',
      caption: 'liquidity in motion.',
      ink: '#14532d',
      span: 'tall',
      thermal: true,
    },
  ];
</script>

<template>
  <BanknoteBento :items="items" paper="#eae6da" :thermal-cycle="9" />
</template>
```

Each card flattens its engraving to luminance and remaps it as an
ink-on-paper duotone — dark engraved lines take the `ink` color, highlights
take the shared `paper` color, exactly like banknote intaglio printing. A
card with `thermal: true` runs a thermal-camera cycle instead: a noisy heat
boundary climbs from the bottom remapping the artwork's luminance through a
rainbow thermal palette, a white-hot rim traces the boundary, and the
caption types itself out in mono while the card runs hot, then everything
recedes back to the cold duotone. `focus` and `zoom` control the cover
crop, `span: 'wide' | 'tall'` the bento footprint.

## Props

### BanknoteBento

<table>
<thead>
  <tr>
    <th>
      Prop
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        items
      </code>
    </td>
    
    <td>
      <code>
        BanknoteBentoItem[]
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Cards, placed in order into the grid
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        paper
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        '#eae6da'
      </code>
    </td>
    
    <td>
      Paper color shared by all duotones
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        thermal-cycle
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        9
      </code>
    </td>
    
    <td>
      Seconds per thermal rise-and-fall cycle
    </td>
  </tr>
</tbody>
</table>

### BanknoteBentoItem

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        src
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Engraving scan URL (CORS-readable when thermal)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        caption
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      —
    </td>
    
    <td>
      Serif caption; typed out on thermal cards
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        captionPosition
      </code>
    </td>
    
    <td>
      <code>
        'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
      </code>
    </td>
    
    <td>
      <code>
        'top-left'
      </code>
    </td>
    
    <td>
      Caption corner
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        captionColor
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      paper tone
    </td>
    
    <td>
      Caption color override
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ink
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        '#1c1917'
      </code>
    </td>
    
    <td>
      Duotone ink color for the engraved lines
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        span
      </code>
    </td>
    
    <td>
      <code>
        'wide' | 'tall' | 'square'
      </code>
    </td>
    
    <td>
      <code>
        'square'
      </code>
    </td>
    
    <td>
      Grid footprint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        storeBadge
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      App Store chip in the bottom-right
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        thermal
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Run the thermal-camera cycle on this card
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        focus
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <code>
        '50% 50%'
      </code>
    </td>
    
    <td>
      Cover-crop focal point (<code>
        x% y%
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        zoom
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        1
      </code>
    </td>
    
    <td>
      Extra zoom into the focal point
    </td>
  </tr>
</tbody>
</table>

## Credits

Ported from the "brutally fresh bento cards" exploration by
[@saintdsgn](https://x.com/saintdsgn/status/2074581394869617137), made in
[@paper](https://paper.design). Demo engravings are public-domain scans from
[Wikimedia Commons](https://commons.wikimedia.org).
