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
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>Options
| Option | Type | Default | What it does |
|---|---|---|---|
| studio | text | 'Maren Aske' | Set small above the headline. |
| headline | text | 'Photographs that wait for the light.' | Headline |
| intro | text | '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 |
| filter | all · landscape · architecture · light | 'all' | The filter the section opens on. Frames outside it are shut where they stand. |
| palette | gallery · darkroom | 'gallery' | A gallery wall, or the darkroom with its safelight. |
| finish | graphite · ink · steel · brass | 'graphite' | The irises’ finish. |
| blades | number, 5 to 16 | 9 | Blade count |
| rest | number, 0.2 to 0.8 | 0.42 | How much of each photograph the iris shows before it is opened: the aperture radius over the frame’s half-diagonal. |
| light | number, 0 to 345 | 315 | The blades’ lamp: 0 from above, clockwise. |
| archive | number, 0 to 9999 | 212 | Frames in the archive |
| booking | text | 'Booking commissions for spring 2027' | Availability line |
Methods
mount(element, options, { Iris })- Builds the block inside the element and returns its handle. Hand it the Iris it is built with.
handle.iriseshandle.update(next = {})- Change options in place.
handle.destroy()- Stops it and cleans up after it.
States
- 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.
- 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.
- 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.
- 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'.
- TouchOn a device without hover, each frame opens as it crosses the middle of the screen and returns to rest as it leaves.
- PaletteGallery (cool paper, black ink, cyanotype blue) or darkroom (near-black, warm white, safelight red), from one token table.
- TabletHead in one column; two columns of frames with the second lowered.
- PhoneOne column of frames, no stagger; the chips wrap; the foot stacks.
- Reduced motionEvery shown frame is fully open from the first paint and nothing moves; the filter still shuts what it hides, at once.
- Off screenAll six irises sleep; the block runs no loop of its own.
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.
Built with
More blocks on the same object: