Modus UI

Drape Type

Web (React)

A verlet drape woven from italic serif letters in your theme's ink. Grab it and pull.

A sheet of italic serif letters hanging from five pegs on the page, faint strokes in the muted tone and dense folds in the palette's primary. Letters stretch and rotate with the weave; grab the sheet and pull. It fills its positioned parent, re-reads the theme when the mode or palette changes, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Drape Type

Installation

CLI

npx @modus-ui/cli add drape-type

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/drape-type.tsx.
  3. Paste the code.

Usage

tsx
import { DrapeType } from "@/components/ui/drape-type";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <DrapeType />
    </div>
  );
}

Props

PropTypeDefaultDescription
textstring"modusholdsthefoldandletsthedraftcarryeverylinetotheedge"Phrase woven into the sheet.
scalenumber1Scales the drawing (clamped 0.65–1.5).
opacitynumber1Overall opacity (clamped 0.1–1).
huenumber0Hue rotation in degrees (clamped -180–180).
saturationnumber1Saturation multiplier (clamped 0–2).
brightnessnumber1Brightness multiplier (clamped 0.4–1.8).
inkColorstringTheme ramp (--muted-foreground → --primary)Colour of the type, any CSS colour.
backgroundColorstringhsl(var(--background))Ground colour, any CSS colour.

Comments

  • No comments yet.