Skip to main content
Clever Ops

Frottage Rubbing

A graphite rubbing over hidden relief, crayon passes sweep the sheet and the React headline surfaces where pigment catches. Canvas text effect themed by Tailwind token probes.

Preview & code

Loading Frottage Rubbing preview

Installation

pnpm dlx shadcn@latest add @cleverui/text-frottage

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { TextFrottage } from '@/components/ui/text-frottage'
Exampletsx
import { TextFrottage } from '@/components/ui/text-frottage'

export default function TextFrottageDemo() {
  return (
    <div className="relative mx-auto flex min-h-[440px] max-w-4xl flex-col items-center justify-center gap-6 overflow-hidden px-4 py-16 sm:px-6">
      <p className="font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground sm:text-xs">
        Spectacle · brass relief under paper
      </p>
      <TextFrottage as="h1" text="CATCH GRAIN" accentWord="GRAIN" className="w-full text-center" />
      <p className="max-w-md text-center text-sm leading-relaxed text-muted-foreground">
        Three diagonal passes deposit pigment only where the relief stands proud.
        Grain stays at the edges; cores go full ink.
      </p>
    </div>
  )
}

API reference

TextFrottage accepts the following props.

PropTypeDefaultDescription
text*stringbudget ≤ 16 chars, the relief is rasterized at display size
accentWordstringword rubbed in primary pigment; defaults to the last word
passesnumber3rubbing passes, clamped 2–4
as'h1' | 'h2' | 'h3' | 'p''h2'heading level of the sr-only text

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Frequently asked questions

How do I install the Frottage Rubbing component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/text-frottage`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Frottage Rubbing require?

Frottage Rubbing has no npm dependencies beyond React and Tailwind CSS itself, so there is nothing extra to install or keep updated.

Can I theme Frottage Rubbing to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services