Concrete
Reference

Formats

Choosing what a template produces — a website, a deck, a social image, a sheet — and what its geometry is.

A format is a self-describing value: an identity (id, label, category), an optional provenance tag naming the preset it came from, and — for everything except the website — a geometry. A template declares one on defineTemplate, and that declaration decides the template's artifact class.

Three classes, and they do not mix. website is the geometry-less singleton and takes pages with a path. An image format (ImageFormat: pixel width and height) and a document format (DocumentFormat: pixel or physical width and height, dpi, an optional bleed) take pathless pages, which render inside the frame their host emits. The three are separate members of a union, so a routed slide, a pathless website page, or a deck format beside a social one fails to compile rather than failing validation.

A rendered template may declare a list of formats of one class — format: [instagramPortrait, instagramSquare] — and the same pages render at each. presets is this whole library as one object, to spread a custom size from. Physical lengths are written as plain decimal digits and a lowercase "in" or "mm" unit: "8.5in", "297mm".

website

Signature

import { website } from "@homepages/concrete";
import type { WebsiteFormat } from "@homepages/concrete";

const format: WebsiteFormat = website; // id "website", category "website"

Constraints

The one geometry-less format, and the only one a website template may declare. It has no width, height, dpi or bleed and the type forbids all four, so a rendered format can never flow into a website slot and a website format can never flow into a frame. It is never tagged with a preset, because it has no geometry to have come from one.

Always the class whose pages carry a path: "/" for the root, one lowercase-kebab segment otherwise. Never in a format list — a site is one site.

Example

import { defineTemplate, website } from "@homepages/concrete";
import type { ReactNode } from "react";

declare const icon: string;
declare const Home: () => ReactNode;

export default defineTemplate({
  key: "riverside",
  name: "Riverside",
  icon,
  scope: "global",
  format: website,
  pages: { home: { label: "Home", path: "/", page: Home } },
});

deck16x9

Signature

import { deck16x9 } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = deck16x9; // 1920 × 1080 px, category "presentation"

Constraints

A widescreen slide: a pixel-sized document format, so it carries no dpi and no bleed. A pixel sheet that declared either would match no branch of the format schema.

Each page is one slide, in the order the template declares them, and each renders inside the frame its host emits. Always pathless pages — a slide has no URL.

Example

import { defineTemplate, deck16x9 } from "@homepages/concrete";
import type { ReactNode } from "react";

declare const icon: string;
declare const Cover: () => ReactNode;
declare const Rooms: () => ReactNode;

export default defineTemplate({
  key: "listing-deck",
  name: "Listing Deck",
  icon,
  scope: "global",
  format: deck16x9,
  pages: {
    cover: { label: "Cover", page: Cover },
    rooms: { label: "Rooms", page: Rooms },
  },
});

instagramSquare

Signature

import { instagramSquare } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const format: ImageFormat = instagramSquare; // 1080 × 1080 px, category "social-post"

Constraints

The 1:1 feed post. An image format, so pixels only — never a dpi or a bleed, which belong to print.

Pairs with instagramPortrait in one list when the same pages should render at both crops; never in a list beside a document format, which is a different class.

Example

import { instagramPortrait, instagramSquare } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const both: readonly [ImageFormat, ...ImageFormat[]] = [instagramSquare, instagramPortrait];

instagramPortrait

Signature

import { instagramPortrait } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const format: ImageFormat = instagramPortrait; // 1080 × 1350 px, category "social-post"

Constraints

The 4:5 feed post — the tallest shape the feed serves uncropped, and so the one to design the feed layout at when a template ships both.

Example

import { defineTemplate, instagramPortrait } from "@homepages/concrete";
import type { PageComponent } from "@homepages/concrete";

declare const icon: string;
declare const Post: PageComponent;

export default defineTemplate({
  key: "just-listed-post",
  name: "Just Listed",
  icon,
  scope: "global",
  format: instagramPortrait,
  pages: { post: { label: "Post", page: Post } },
});

instagramStory

Signature

import { instagramStory } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const format: ImageFormat = instagramStory; // 1080 × 1920 px, category "story"

Constraints

The full-screen 9:16 story, and the one social preset in the story category rather than social-post — the category is browsing metadata, so a picker groups it apart from the feed sizes.

Design for the safe area: a story is overlaid with the platform's own chrome top and bottom, and the framework paints no guides.

Example

import { instagramStory } from "@homepages/concrete";

const tall: boolean = instagramStory.height > instagramStory.width;

facebookPost

Signature

import { facebookPost } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const format: ImageFormat = facebookPost; // 1200 × 630 px, category "social-post"

Constraints

The landscape link-and-feed image. Wide and short: a portrait composition has to be re-laid out for it rather than scaled, which is why a template that ships both declares a list and lets each page's CSS answer the shape.

Example

import { facebookPost, linkedinPost, xPost } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const landscape: readonly [ImageFormat, ...ImageFormat[]] = [facebookPost, linkedinPost, xPost];

linkedinPost

Signature

import { linkedinPost } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const format: ImageFormat = linkedinPost; // 1200 × 627 px, category "social-post"

Constraints

Three pixels shorter than facebookPost and otherwise the same shape. Declare both rather than serving one for the other: the tag on each says which size the artifact actually is, and a picker shows it.

Example

import { facebookPost, linkedinPost } from "@homepages/concrete";

const sameWidth: boolean = linkedinPost.width === facebookPost.width;

xPost

Signature

import { xPost } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const format: ImageFormat = xPost; // 1600 × 900 px, category "social-post"

Constraints

The 16:9 post image. It is the same aspect as deck16x9 and a different class — an image, not a document — so a slide layout is reusable as CSS and the two formats are not interchangeable in a template's declaration.

Example

import { deck16x9, xPost } from "@homepages/concrete";

const sameAspect: boolean =
  xPost.width / xPost.height === Number(deck16x9.width) / Number(deck16x9.height);

letterPortrait

Signature

import { letterPortrait } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = letterPortrait; // 8.5in × 11in, 300 dpi, 0.125in bleed

Constraints

US Letter, upright — the default single-property brochure sheet. A physical document format: width and height are lengths, dpi fixes the raster the renderer cuts, and bleed is the margin the printer trims into.

Design to the bleed box, not to the trim: the frame fills the bleed box and clips at its own edge, and the trim guides are host chrome that never reaches the rendered bytes.

Example

import { defineTemplate, letterPortrait } from "@homepages/concrete";
import type { ReactNode } from "react";

declare const icon: string;
declare const Sheet: () => ReactNode;

export default defineTemplate({
  key: "one-sheet",
  name: "One Sheet",
  icon,
  scope: "global",
  format: letterPortrait,
  pages: { sheet: { label: "Sheet", page: Sheet } },
});

letterLandscape

Signature

import { letterLandscape } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = letterLandscape; // 11in × 8.5in, 300 dpi, 0.125in bleed

Constraints

US Letter on its side. Same sheet, same bleed, transposed — so it belongs in a list beside letterPortrait only when the pages genuinely lay out both ways.

Example

import { letterLandscape, letterPortrait } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const sheets: readonly [DocumentFormat, ...DocumentFormat[]] = [letterPortrait, letterLandscape];

a4Portrait

Signature

import { a4Portrait } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = a4Portrait; // 210mm × 297mm, 300 dpi, 3mm bleed

Constraints

The metric brochure sheet, in millimetres and with the 3mm bleed the metric trade expects. Never mix units within one format — a length is digits and a single lowercase "in" or "mm", and nothing else parses.

Declare this beside a Letter size only for a template that genuinely ships to both markets; the two are near, not equal, and a layout tuned to one letterboxes in the other.

Example

import { a4Portrait } from "@homepages/concrete";

const metric: boolean = String(a4Portrait.width).endsWith("mm");

a4Landscape

Signature

import { a4Landscape } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = a4Landscape; // 297mm × 210mm, 300 dpi, 3mm bleed

Constraints

A4 on its side, with the same dpi and bleed. The brochure category, like every sheet here — the category is what a picker groups by and has nothing to do with geometry.

Example

import { a4Landscape, a4Portrait } from "@homepages/concrete";

const transposed: boolean = a4Landscape.width === a4Portrait.height;

postcard6x4

Signature

import { postcard6x4 } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = postcard6x4; // 6in × 4in, 300 dpi, 0.125in bleed

Constraints

The standard mailer, in the postcard category. Two pages — front and back — is the usual shape, and a postcard template declares them as two pathless pages rather than one page with a variant.

Example

import { defineTemplate, postcard6x4 } from "@homepages/concrete";
import type { ReactNode } from "react";

declare const icon: string;
declare const Front: () => ReactNode;
declare const Back: () => ReactNode;

export default defineTemplate({
  key: "just-listed",
  name: "Just Listed",
  icon,
  scope: "global",
  format: postcard6x4,
  pages: {
    front: { label: "Front", page: Front },
    back: { label: "Back", page: Back },
  },
});

postcard7x5

Signature

import { postcard7x5 } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = postcard7x5; // 7in × 5in, 300 dpi, 0.125in bleed

Constraints

The oversized mailer — more area at a higher postage class. Same category and same bleed as postcard6x4, so a template that offers both declares a list and the pages answer the two shapes in CSS.

Example

import { postcard6x4, postcard7x5 } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const mailers: readonly [DocumentFormat, ...DocumentFormat[]] = [postcard6x4, postcard7x5];

halfLetterFlyer

Signature

import { halfLetterFlyer } from "@homepages/concrete";
import type { DocumentFormat } from "@homepages/concrete";

const format: DocumentFormat = halfLetterFlyer; // 5.5in × 8.5in, 300 dpi, 0.125in bleed

Constraints

Half of a Letter sheet, in the flyer category: the open-house handout. Two of them print on one sheet, which is why the size exists and why the bleed is the Letter bleed.

Example

import { halfLetterFlyer, letterPortrait } from "@homepages/concrete";

const halfHeight: boolean = halfLetterFlyer.height === letterPortrait.width;

presets

Signature

import { presets } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const square: ImageFormat = presets.instagramSquare;

Constraints

The same objects the individual exports name, gathered as one value — reach for it to spread a custom size from a known one, or to enumerate the library.

Spread and override, never mutate: a format value is shared, and editing one in place changes every template in the process. Override the geometry and the provenance tag becomes a lie — preset says which library entry the geometry came from, and a tagged format whose width, height, dpi or bleed no longer match that entry is rejected. Drop preset when you change any of the four; re-label or re-categorize freely, because identity is not geometry.

Example

import { presets } from "@homepages/concrete";
import type { ImageFormat } from "@homepages/concrete";

const wideBanner: ImageFormat = {
  ...presets.facebookPost,
  id: "wide-banner",
  label: "Wide Banner",
  preset: undefined,
  width: 1600,
  height: 400,
};

See also

Primitives for FrameShell, the frame a rendered format is drawn inside, the rest of the reference, and every rule.