Skip to Content

Vibrant Grain

Vibrant grain texture: sparkling noise in three stacked turbulence layers, the top one at screen blend so it reads as silver-halide glints rather than surface texture. One strength value scales every layer.

Installation

pnpm dlx shadcn@latest add @01orbital/vibrant-grain

Usage

import { SideGlow } from "@/components/glow/side-glow"
import { Subheading } from "@/components/subheading/subheading"
import { VibrantGrain } from "@/components/texture/vibrant-grain"

const COPY = {
  title: "Night notes",
  body: "Written after sundown.",
} as const

export default function VibrantGrainDemo() {
  return (
    <div className="flex min-h-full w-full flex-1 items-center justify-center p-6">
      <article className="relative isolate flex aspect-4/3 w-full max-w-96 flex-col justify-end overflow-hidden rounded-3xl bg-[oklch(0.372_0.044_257.3)] p-8 text-scene-foreground">
        <SideGlow />
        {/* Its screen layer brightens the card; at 0.45 the white copy keeps
            at least 4.5:1 contrast. */}
        <VibrantGrain strength={0.45} />
        <div className="relative">
          <Subheading>{COPY.title}</Subheading>
          <p className="mt-3 text-sm/6">{COPY.body}</p>
        </div>
      </article>
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-demo

Examples

· Announcement pillvibrant-grain-announcement-pill

Vibrant Grain texture example: a dismissible pill-shaped announcement on a warm brown ground, with tonal grain under white speckle, a label, a message, a link and a close button. Use it for a site-wide notice.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-announcement-pill

· Launch bannervibrant-grain-launch-banner

Vibrant Grain texture example: a launch banner on a warm brown ground under both grains, with a headline, copy, a link and three swatches showing each grain alone and the two stacked. Use it to announce a product.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-launch-banner

· Sale bannervibrant-grain-sale-banner

Vibrant Grain texture example: a sale banner on a warm brown ground under a strong white speckle, with a large discount figure, two lines of copy and a link. Use it for a limited offer.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-sale-banner

· Status bannervibrant-grain-status-banner

Vibrant Grain texture example: a one-line status banner on a warm brown ground under a light white speckle, with a status dot, a message and a state label. Use it for a system status line.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-status-banner

· Event bannervibrant-grain-event-banner

Vibrant Grain texture example: a centered event banner on a warm brown ground, with tonal grain under white speckle, a date line, a headline and a link. Use it for a live event.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-event-banner

· Countdown bannervibrant-grain-countdown-banner

Vibrant Grain texture example: a countdown banner on a warm brown ground under white speckle, with a label, a title and three cream counter tiles. Use it ahead of a launch.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-countdown-banner

· Testimonial bannervibrant-grain-testimonial-banner

Vibrant Grain texture example: a customer quotation on a warm brown ground, with tonal grain under white speckle and a credit line. Use it for a testimonial.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-testimonial-banner

Embervibrant-grain-ember

Vibrant Grain Ember: an example of vibrant-grain.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-ember

Lagoonvibrant-grain-lagoon

Vibrant Grain Lagoon: an example of vibrant-grain.

pnpm dlx shadcn@latest add @01orbital/vibrant-grain-lagoon

API reference

Colored film-grain speckle in layers, laid over the art in a full-bleed, click-through layer. It is decorative and hidden from assistive tech.

Prop

Type

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

Dependencies

npm: cn. The CLI installs it for you.

Used in blocks

One block is built with Vibrant Grain.

Last updated on