Skip to Content

Slab Field

Slab gradient background: soft vertical slabs and slivers of light over a glow and a floor, painted from a field you pass with ground color, slabs and grain or your own texture. The Rust, Sage and Stained slab sections are its presets.

Installation

pnpm dlx shadcn@latest add @01orbital/slab-field

Usage

import { SlabField } from "@/components/scene/slab-field"

Needs props to render

Pass field; see the API reference below.

API reference

A full-bleed ground of soft vertical slabs and slivers of light over a glow and a floor, painted from field: a ground color, a glow, the slabs ("doors"), the thin slivers and the floor fade. Content passed as children sits centered over it.

texture is laid over the painting: the gray grain by default; pass your own layers, such as a different grain or an edge scrim, or null for none.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

Used in blocks

6 blocks are built with Slab Field:

Last updated on