docs / sula / sula-field

SulaField

an ambient veil of slow liquid glass: dark masses heave behind, lit glass drifts and kisses in front, and your content stays crisp and interactive above it.

intensity · assertsrsc · client

provenance

authored in usva

layer

sula

intensity

asserts · one per region. it is the focal point

composition

behind a landing hero, a splash, a section break. one per viewno children makes it a bare background layer you position yourselfnever under a second sula surface, and never behind a work surfacenever CSS-scale it. the pool spills out of the transformed box

a11y

the canvas layer is aria-hidden and pointer-transparent · content renders above it exactly as it would with no fieldjest-axe

dependencies

motion · ogl · sula-core from the same package
live demo · try it out

mist, made of glass

slow glass gathers at the edges and leaves the words clear

customize
speeddrift-rate multiplier
1
interactivethe veil leans toward the pointer
seedsame value wanders the same way
0
fluidoff mounts no canvas, one static frame
usagecopy
import { SulaField } from "@usva-ui/react/sula/sula-field";

<SulaField
>
  <Hero />
</SulaField>

props

proptypedefaultnotes
childrenReactNoderendered in normal flow above the field. omit it for a bare layer you position yourself.
speednumber1drift-rate multiplier. higher drifts faster.
driveSulaFieldDriveambientDriftthe choreography: a pure function of time and bounds. clamped to 12 bodies per plane and 8 necks, the surplus is not drawn.
interactivebooleanfalsethe field leans toward the eased cursor. off so the background does not compete.
seednumber0the same value wanders the same way, across renders and SSR.
fluidbooleantruefalse mounts no canvas. reduced motion paints one static frame instead.
stillTimenumber0which instant of the drive the reduced-motion still is taken from, in seconds.
accentColorstringaccent tokenrim light and glow on the blobs.
backdropstringbg tokenthe colour the glass tints against.
tintstringsurface-2 tokenthe glass itself.
shinenumberper theme0 is flat matte glass, 1 is the full neon rim.

get it

bun add @usva-ui/reactcopy
usagecopy
import { SulaField } from "@usva-ui/react/sula/sula-field";

<SulaField className="min-h-svh">
  <Hero />
</SulaField>