Skip to Content

Felt

A felt component.

Installation

pnpm dlx shadcn@latest add @01orbital/felt

Usage

import { ColorWash } from "@/components/scene/color-wash"
import { Felt } from "@/components/texture/felt"

export default function FeltDemo() {
  return (
    <div className="grid h-full min-h-96 grid-cols-2">
      <div className="relative">
        {/* ground grain off — the demoed texture is the only grain */}
        <ColorWash color="pewter" grain={0} className="absolute inset-0" />
        <Felt />
      </div>
      <div className="relative">
        <ColorWash color="oxblood" grain={0} className="absolute inset-0" />
        <Felt />
      </div>
    </div>
  )
}

This example installs with everything it uses:

pnpm dlx shadcn@latest add @01orbital/felt-demo

Examples

· Announcement pillfelt-announcement-pill

Felt texture example: a dismissible pill-shaped announcement on a pewter painted ground, with a label, a message, a link and a close button. Use it for a site-wide notice.

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

· Sale bannerfelt-sale-banner

Felt texture example: a sale banner on an oxblood painted ground with a large discount figure, two lines of copy and a call-to-action link. Use it for a limited offer.

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

· Newsletter bannerfelt-newsletter-banner

Felt texture example: a newsletter signup banner on a chambray painted ground with an email field and a subscribe button that confirms. Use it for an inline signup.

pnpm dlx shadcn@latest add @01orbital/felt-newsletter-banner

· Status bannerfelt-status-banner

Felt texture example: a one-line status banner on a lichen painted ground with a status dot, a message and a state label. Use it for a system status line.

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

· Countdown bannerfelt-countdown-banner

Felt texture example: a countdown banner on a heather painted ground with a label, a title and three white counter tiles. Use it ahead of a launch.

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

· Promo code bannerfelt-promo-code-banner

Felt texture example: a promo code banner on a kiln painted ground with the code and a button that copies it. Use it for a discount offer.

pnpm dlx shadcn@latest add @01orbital/felt-promo-code-banner

· Testimonial bannerfelt-testimonial-banner

Felt texture example: a serif customer quotation on a mallow painted ground with a credit line. Use it for a testimonial.

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

API reference

Full-bleed art layer — drop inside a relative parent; sits behind content. Three noise passes: nap multiply, coarse fiber overlay, fine weave soft-light. Reads on mid-grey grounds only (weave dies near white and near black).

It accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Last updated on