Hero Templates

Silvergrass

A field of silver grass under the moon, beside left-aligned copy. Wind rolls across thousands of blades drawn on the GPU. The grass parts around the pointer, a click sends a ring of wind through it, and a drag turns the view.

Install

bun add ogl

Then copy 2 files into your project:

  • components/registry/silvergrass/silvergrass.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
density"16000" | "32000" | "64000""32000"How many blades, in fixed steps. Each step rebuilds the blade buffer.
tipColorstring (hex)"#d8d1f0"Color of the moonlit blade tips.
bladeColorstring (hex)"#2b2540"Color of the blades near the ground.
glowColorstring (hex)"#a855f7"Light around the pointer and in each ring of wind.
skyColorstring (hex)"#0a0916"Night sky, and the fog that hides the far field.
windSpeednumber1How fast the wind rolls across the field.
windStrengthnumber1How far the blades bend in the wind.
bladeHeightnumber1Blade height multiplier.
partRadiusnumber1.2How wide the grass parts around the pointer. 0 turns it off.
gustbooleantrueA click or tap sends a ring of wind out through the field.
moonbooleantrueShow the moon. Off keeps only its light.
motesbooleantrueSmall points of light drifting over the grass.
zoomnumber1Camera distance multiplier.
autoSpinbooleantrueSlow camera drift while nothing is held.

What It Demonstrates

Loop
An animation that repeats, a set number of times or infinitely.
Hover effect
Visual change when the cursor moves over an element.
Ripple
A circle expanding from the point of a tap, confirming the press.
Drag
Moving an element by grabbing it, often with momentum when released.
Momentum
Motion that carries velocity, especially after a drag or interruption.
Idle animation
Subtle motion that plays while an element is just sitting there, waiting to be interacted with.
Hardware acceleration
Animating transform and opacity lets the GPU keep motion smooth.

Related Components

Appears In