docs / sula / sula-frame

SulaFrame

a liquid border that hugs a rounded rectangle, calm at rest and leaning toward the cursor. wrap a card for a glowing brand edge, or set fixed to frame the whole viewport.

intensity · assertsrsc · client

provenance

shaped from personal-website

layer

sula

intensity

asserts · one per region. it is the focal point

composition

wrap one hero card, a pricing panel, a focal surfacefixed mode as page chrome, inset from the viewport edgeone liquid surface per view. it is a wow moment, not dense product chromenever CSS-scale the frame; it measures its own box

a11y

the canvas layer is aria-hidden · wrapped content stays in normal flow, fully interactive · a :focus-visible inside wakes the ringjest-axe

dependencies

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

a frame that answers

drag the cursor along the edge, or focus the button, and the border leans toward you

customize
radiuscorner radius in px, drives the box too
20
thicknessband width in px
2
insetgap between the frame and the edge
5
shine0 flat matte, 1 full neon rim
0.7
fluidoff paints the static accent border
introone-time reveal ramp on mount
usagecopy
import { SulaFrame } from "@usva-ui/react/sula/sula-frame";

<SulaFrame
  radius={20}
  inset={5}
  className="bg-surface px-10 py-9"
>
  <Pricing />
</SulaFrame>

props

proptypedefaultnotes
childrenReactNodewrapped content, in normal flow above the canvas. optional in fixed mode.
fixedbooleanfalsefalse wraps its own box; true is a position:fixed frame around the viewport.
radiusnumbercorner radius in px. wrapper mode reads the box's computed border-radius; fixed mode scales with viewport width.
thicknessnumber2band width in px.
insetnumber0gap between the frame and the edge in px. the viewport margin in fixed mode.
fluidbooleantruefalse mounts no canvas; reduced motion paints the static border instead.
introbooleantruea one-time reveal ramp on mount. skipped under reduced motion.
accentColorstringaccent tokenrim light and glow.
backdropstringbg tokenthe colour the glass tints against.
tintstringsurface-2 tokenthe glass itself.
shinenumberper theme0 is flat matte, 1 is the full neon rim.

get it

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

<SulaFrame radius={20} className="rounded-[20px] bg-surface p-8">
  <Pricing />
</SulaFrame>

<SulaFrame fixed inset={12} />