↓ Scroll

Armour

  • Shop
  • Journal
  • Instagram
  • Contact

ARMOUR

Photo wordmark

A huge wordmark filled with a photo, cropped at the bottom and rising out of the crop as it scrolls in.

Behaviour

  • Fills its width with no measuring: a cqi font size from the character count and --advance.
  • Scrolling it into view raises the word a little out of the crop and drifts the photo inside the letters.
  • The glow copy is aria-hidden, so the word is read once.
  • Reduced motion: static, at its final crop with the photo still.

Props

PropTypeDescription
textstringThe word. One line, sized to fill the width.
srcstringThe photo inside the letters.
as"p" | "h1" | "h2" | "span"default "p"The text element. A p so a footer does not add an h1.
cropnumberdefault 0.3Fraction of the glyph height hidden under the bottom edge, 0 to 0.9.
glowbooleandefault trueA blurred copy of the photo behind the word.
containerRefObject<HTMLElement | null>default the pageFollow a scrolling box instead of the page.
classNamestringFont family and tracking. Set [--advance:0.9] for a wider face (average glyph width in em, default 0.75).

Installation

npx shadcn@latest add https://purrfectui.com/r/photo-wordmark.json

How to use

import { PhotoWordmark } from "@/components/ui/photo-wordmark";

<footer className="overflow-hidden">
  <PhotoWordmark text="ARMOUR" src="/field.jpg" className="font-black tracking-tight" />
</footer>

Source code

Loading…

Credits

Ported from armour.vaibhavtomar.com.

License

MIT. Copy it into your project and change it as you like.

0