Skip to Content

Limned Surface

Rim-lit dark panel: inset light along the edge, with a halo or top-cast glow derived from a ground and glow palette, optional overlay grain and a hover or focus bloom that drops its transition under reduced motion.

Installation

pnpm dlx shadcn@latest add @01orbital/limned-surface

Usage

import { LimnedSurface } from "@/components/texture/limned-surface"

// The palette is the knob: the ground it paints and the light that limns the edge.
const PALETTE = {
  ground: "oklch(0.315 0.064 270.3)",
  glow: "oklch(0.936 0.055 102.9)",
} as const

export default function LimnedSurfaceDemo() {
  return (
    <LimnedSurface
      variant="halo"
      palette={PALETTE}
      bloom
      className="aspect-4/3 w-full max-w-md rounded-2xl"
    />
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/limned-surface-demo

Examples

Emberlimned-surface-ember

Limned Surface Ember: an example of limned-surface.

pnpm dlx shadcn@latest add @01orbital/limned-surface-ember

Orchidlimned-surface-orchid

Limned Surface Orchid: an example of limned-surface.

pnpm dlx shadcn@latest add @01orbital/limned-surface-orchid

API reference

A panel lit from within, for a signup box or callout: a filled ground with a light rim inside its top edge, a shade inside its bottom edge, light cast around it and a grain over the ground. Text inside takes a pale tint of the glow unless you set palette.ink.

It has no corner radius or padding of its own; set them with className. Palette colors can be any CSS color: plain oklch() values are adjusted in JavaScript, others in CSS.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

Used in blocks

One block is built with Limned Surface.

Last updated on