Frame corners
StableThe logo’s two shapes as a viewfinder: an L bottom-left and a square top-right, drawn around any box.
It fills its nearest positioned parent and takes the text colour. When it scrolls into view inside a page that calls useLuxe(), the arms of the L grow out from the corner and the square settles in, once. With reduced motion, or before scripts run, it simply sits there, complete.
Viewfinder
import { useState } from 'react'import { useLuxe } from '@rchursin/components/motion'import { FrameCorners } from '@rchursin/home/ui'import { Button } from '@rchursin/product/ui'
/** * The logo's two shapes as a viewfinder around the work. When it scrolls into view the L draws * itself from the corner and the square settles in, once (only when motion is allowed). * useLuxe() on a parent arms the arrival; Replay remounts the frame to run it again. */export default function FrameViewfinder() { const root = useLuxe<HTMLDivElement>() const [replay, setReplay] = useState(0) return ( <div ref={root} className="flex w-full max-w-lg flex-col items-center gap-6"> <div className="relative w-full px-10 py-14 text-fg sm:px-14"> <FrameCorners key={replay} stroke="8px" arm="48px" /> <p className="font-mono text-[12px] font-medium text-fg-3">RChursin_</p> <p className="mt-3 text-[1.75rem] leading-[1.15] font-semibold tracking-[-0.03em] text-balance">Tools for AI coding agents.</p> </div> <Button size="sm" variant="secondary" icon="rotate-ccw" onClick={() => setReplay((n) => n + 1)}> Replay </Button> </div> )}Usage
import { FrameCorners } from '@rchursin/home/ui'<div className="relative p-10"> <FrameCorners stroke="8px" arm="48px" /> <h2>Tools for AI coding agents.</h2></div>Examples
Stroke and reach
Thin and short around small things, heavier around intros.
import { FrameCorners } from '@rchursin/home/ui'
/** * stroke sets the bar thickness (the square is 2.57× it, as in the mark); arm sets how far each * arm of the L reaches, in any CSS length. Thin and short around small things, heavier around intros. */const frames = [ { stroke: '3px', arm: '28%', label: 'Avatar', box: 'size-24', content: <span className="flex size-full items-center justify-center rounded-md bg-sunken text-lg font-semibold tracking-[-0.02em]">RC</span>, }, { stroke: '5px', arm: '22%', label: 'Card', box: 'h-28 w-full', content: <span className="text-[13px] text-fg-2">A quiet frame for a figure or a quote</span> }, { stroke: '10px', arm: '40px', label: 'Intro', box: 'h-28 w-full', content: <span className="text-lg font-semibold tracking-[-0.02em]">The work, framed</span> },]
export default function FrameSizes() { return ( <div className="@container w-full max-w-3xl"> <ul className="grid items-end gap-8 @2xl:grid-cols-[auto_1fr_1fr]"> {frames.map((f) => ( <li key={f.label} className="flex min-w-0 flex-col items-center gap-3"> <div className={`relative flex items-center justify-center p-3.5 text-center text-fg ${f.box}`}> <FrameCorners stroke={f.stroke} arm={f.arm} /> {f.content} </div> <p className="flex flex-col items-center gap-0.5 text-center"> <span className="text-[12.5px] font-medium text-fg">{f.label}</span> <code className="font-mono text-[11px] text-fg-3"> stroke="{f.stroke}" arm="{f.arm}" </code> </p> </li> ))} </ul> </div> )}API
Frame corners props
| Prop | Type | Default | Description |
|---|---|---|---|
stroke | string | 'clamp(6px, 1.1vw, 14px)' | Bar thickness, any CSS length. The square is 2.57 times it, as in the mark (36 : 14). |
arm | string | '30%' | How far each arm of the L reaches: a share of the box, or any CSS length. |
className | string | – | Extra classes on the frame, e.g. a negative margin (-m-3) to let it sit outside the content, or a text colour. |
CSS
| Class or variable | What it does |
|---|---|
lux-frame | The frame’s root, which useReveal watches. Its arrival is described under Scroll arrivals. |
lux-draw-v · lux-draw-h · lux-draw-sq | The two arms grow from the corner (1.1s, the second 120ms later); the square scales in after 380ms. |
--fs · --arm | The stroke and arm values, set as CSS variables on the root. |
Accessibility
- The frame is aria-hidden and ignores the pointer: it is decoration around content that speaks for itself.
- The drawing only animates when the visitor allows motion; otherwise it is shown complete from the start.
Guidelines
Do
- Use one frame per view, around the thing you want looked at.
- Give the content padding so the corners never touch the text.
Don’t
- Don’t frame every card; it stops meaning anything.
- Don’t put a frame and the full logo side by side; the frame already is the mark.
In use
Related
- LogoThe 09 Frame mark and the RChursin_ wordmark in four lockups, drawn as one SVG that takes the text colour.
- Scroll arrivalsContent that fades and rises in as it scrolls into view, bars that grow, stamps that land and a frame that draws itself.
- Auth layoutThe frame for every sign-in page: a dark brand panel when there is room, one calm form column, the logo on top and legal links below.
- The FrameThe logo becomes a viewfinder: frame the few skills that work and cut the rest, with an estimator and a floating header.
Source
The component’s own files, exactly as they run on this site.
/** * Small building blocks shared by the four home pages. * All black-and-white; every state is told apart by shape or text, never by colour alone. */import { useEffect, useRef, useState, type ComponentPropsWithoutRef, type CSSProperties, type MouseEvent, type ReactNode,} from "react"import { cx } from "../components/cx"import { useIsApple } from "../product/lib/hotkeys"import { copyText } from "../product/ui/code"import type { Verdict } from "./content"
/** Stagger index for .lux-reveal children (each step is 70ms) */export const delay = (d: number) => ({ "--d": d }) as CSSProperties