Skip to the page
TACTILE UI

05.1Block 05.1 · Galleries

Portfolio Iris

A photographer’s index where every frame is a shutter. Photographs peek through graphite blades, open whole on hover or focus, and shut where they stand when a filter leaves them out.

Version
0.1.0
Size
107.2 KB gzipped
Access
With a Pass
Needs
portfolio-iris.mjs + portfolio-iris.css · Iris
Tests
8 tests · 10 states
On this page
  1. Use it
  2. Options
  3. Methods
  4. States
  5. How it works
  6. Built with
01

Use it

A finished portfolio section for a photographer or studio that makes browsing the work physical: each project frame is its own iris, so the grid reads as a wall of shutters and opening a project is opening a lens. Ships with six drawn photographs, an editorial serif and mono type system, a filter that closes what it hides without reflowing, and two palettes.

Copy the portfolio-iris folder and the iris folder from its package next to your page, link the stylesheets and mount it on an element. Every option has a default; the lab’s Code tab writes the same example at any settings, and for React, Vue, Svelte or a custom element (Using a framework).

<link rel="stylesheet" href="iris/iris.css">
<link rel="stylesheet" href="portfolio-iris/portfolio-iris.css">
<div id="portfolio-iris"></div>

<script type="module">
  import Iris from './iris/iris.mjs';
  import { mount } from './portfolio-iris/portfolio-iris.mjs';

  const portfolioIris = mount(document.getElementById('portfolio-iris'), {
    studio: 'Maren Aske',
    headline: 'Photographs that wait for the light.',
    intro: 'Commissioned and personal work from the edges of places: salt flats, sea fog, stairwells, the hour after dusk. Open a frame to see it whole.',
  }, { Iris });

  // portfolioIris.update({ … });   change any option in place
  // portfolioIris.destroy();        and take it away again
</script>
02

Options

OptionTypeDefaultWhat it does
studiotext'Maren Aske'Set small above the headline.
headlinetext'Photographs that wait for the light.'Headline
introtext'Commissioned and personal work from the edges of places: salt flats, sea fog, stairwells, the hour after dusk. Open a frame to see it whole.'Introduction
filterall · landscape · architecture · light'all'The filter the section opens on. Frames outside it are shut where they stand.
palettegallery · darkroom'gallery'A gallery wall, or the darkroom with its safelight.
finishgraphite · ink · steel · brass'graphite'The irises’ finish.
bladesnumber, 5 to 169Blade count
restnumber, 0.2 to 0.80.42How much of each photograph the iris shows before it is opened: the aperture radius over the frame’s half-diagonal.
lightnumber, 0 to 345315The blades’ lamp: 0 from above, clockwise.
archivenumber, 0 to 9999212Frames in the archive
bookingtext'Booking commissions for spring 2027'Availability line
03

Methods

mount(element, options, { Iris })
Builds the block inside the element and returns its handle. Hand it the Iris it is built with.
handle.irises
handle.update(next = {})
Change options in place.
handle.destroy()
Stops it and cleans up after it.
04

States

  1. At restSix 4:5 frames in three columns, the middle one lowered; each shows a nonagon of its photograph through nine graphite blades at rest 0.42; every iris asleep.
  2. Intro cascadeEach frame waits shut until a third of it is in view, then opens to rest, so the grid opens frame by frame as it scrolls in.
  3. Hover or focusThe project's iris opens the whole frame through the spring; its title underlines and 'Open project →' slides in; leaving returns it to rest.
  4. FilterChoosing Landscape, Architecture or Light studies shuts every other frame where it stands, dims and inerts it, and the live status line reads 'Showing 2 of 6 projects: Landscape'.
  5. TouchOn a device without hover, each frame opens as it crosses the middle of the screen and returns to rest as it leaves.
  6. PaletteGallery (cool paper, black ink, cyanotype blue) or darkroom (near-black, warm white, safelight red), from one token table.
  7. TabletHead in one column; two columns of frames with the second lowered.
  8. PhoneOne column of frames, no stagger; the chips wrap; the foot stacks.
  9. Reduced motionEvery shown frame is fully open from the first paint and nothing moves; the filter still shuts what it hides, at once.
  10. Off screenAll six irises sleep; the block runs no loop of its own.
05

How it works

Made of: Iris per frame, Shared webgl context, Intro cascade, Filter shuts in place, Mid screen touch reveal, Procedural photographs, Palette tokens from one table.

Original composition; the photographer (Maren Aske), the projects and all copy are invented. The six photographs are canvas paintings made in portfolio-iris.mjs from fixed seeds: no image ships. Faces: Libre Baskerville and IBM Plex Mono (SIL OFL 1.1), full fonts converted to WOFF2.

06

Built with

More blocks on the same object:

Docs
Finish
Volume