Decoration & visibility (BlockShell)
Styling and visibility available on most blocks.
Most blocks share one reusable shell object. It is stored on shell, not as separate block types. Every shell prop lives under shell.*: shell.visibility, shell.anchor, shell.box, shell.background, shell.border, shell.shadow, shell.effects, and the motion groups (scrollAnimation, cursorTilt, wander, transform). pointerEvents, group, and peer sit directly on shell. The fields below are the same on every block that has the shell. A block that draws its own decoration uses them for visibility only.
Fields
shell
visibility
Authored boolean list at shell.visibility (the leaf itself — not a nested { visible } / { auth } object). Each rule is { if, is } with boolean is. Conditions inside one if array all must match (AND). Drivers: { bp }, { loc }, { compare } ({ var, op, value? } — ops eq/neq/gt/gte/lt/lte/in/not-in/contains/empty/not-empty/truthy/falsy), { auth }, { role }, { routeLock } (locked | unlocked), { entryAction } (canUpdate | canDelete), { queryPage } (first | rest). Among matching rules, the highest driver-count wins (tie → earlier entry); if: "*" is specificity 0. Negate by setting is: false on the matching rule. Hide when empty: { if: [{ compare: { var: "id", op: "empty" } }], is: false } plus { if: "*", is: true }. Missing shell.visibility stays visible. Writes reject unknown drivers/ops and non-boolean is. On the public site the active breakpoint id comes from .website-frame container inline-size (@container website / --bp) via CSS, not window.matchMedia or React width state.
shell: {
visibility: [
{ if: [{ bp: "mobile" }], is: false },
{ if: [{ auth: "anonymous" }], is: false },
{ if: [{ compare: { var: "cart_items", op: "empty" } }], is: false },
{ if: "*", is: true }
]
}anchor
anchorId
DOM id for in-page links. Stored at shell.anchor.anchorId. Summary lists shell when this object is present.
shell: {
anchor: {
anchorId: [
{ if: "*", is: "pricing" }
]
}
}anchorKey
Stable key used to derive the anchor id. Stored at shell.anchor.anchorKey.
shell: {
anchor: {
anchorKey: [
{ if: "*", is: "pricing" }
]
}
}box
padding
Unit: token
Authored padding insets on shell.box.padding.{top,right,bottom,left}. A block has padding iff this map is present. Legacy spacing tokens ("md", "lg", …) still load and expand to four-side maps on write.
Catalog shape: Authored inset map shell.box.padding.{top,right,bottom,left} with { n, u } values, e.g. top: [{ if: "*", is: { n: 8, u: "px" } }]. Split breakpoints with [{ if: [{ bp: "mobile" }], is: … }, { if: "*", is: … }]. Bare tokens ("md") and Authored token lists ([{ if: "*", is: "md" }]) still load.
Options: none, xs, sm, md, lg, xl
shell: {
box: {
padding: {
top: [{ if: "*", is: { n: 8, u: "px" } }],
right: [{ if: "*", is: { n: 8, u: "px" } }],
bottom: [{ if: "*", is: { n: 8, u: "px" } }],
left: [{ if: "*", is: { n: 8, u: "px" } }]
}
}
}margin
Authored margin insets on shell.box.margin.{top,right,bottom,left}. Use { n: 0, u: "auto" } on left/right to center a fixed-width block. A block has margin iff this map is present.
shell: {
box: {
margin: {
left: [{ if: "*", is: { n: 0, u: "auto" } }],
right: [{ if: "*", is: { n: 0, u: "auto" } }]
}
}
}size
Authored box size on shell.box.size. Each axis (width, height, maxWidth, maxHeight, minWidth, minHeight) has catalog leaves such as mode, static, relative, ratio, viewport, and optional flex.{grow,shrink,basis}. Every leaf is an Authored [{ if, is }] list; use { bp: "mobile" } conditions instead of breakpoint-keyed maps. Modes include fill, fitContent, static, relative, viewport, and ratio. Max width uses maxWidth.mode (none, parent, page, static). Max height uses maxHeight.mode (none, parent, static) and clamps the frame independently of height.mode (for example a ratio frame capped at 600px). When height.mode is ratio, the frame uses min-height: 0 and clips overflowing slot content so the aspect ratio wins over content min-height on grid children.
Example centered column: width.mode: [{ if: "*", is: "static" }], width.static: [{ if: "*", is: { n: 720, u: "px" } }], plus margin.left / margin.right auto on shell.box.margin. FlexList children: size.flex.grow: [{ if: "*", is: 1 }] with basis: [{ if: "*", is: "auto" }].
shell: {
box: {
size: {
width: {
mode: [{ if: [{ bp: "mobile" }], is: "fill" }, { if: "*", is: "relative" }],
relative: [{ if: "*", is: 50 }]
},
flex: { grow: [{ if: "*", is: 1 }], shrink: [{ if: "*", is: 1 }], basis: [{ if: "*", is: "auto" }] }
}
}
}container
Authored container layout on shell.box.container. A decoration frame is a div, so its children sit in normal flow until this group makes the frame their flex/grid host — the authored equivalent of the carrier rules that set display:grid on a wrapper. Leaves: display (block, flex, grid), flexDirection (row, row-reverse, column, column-reverse), columns / rows (raw grid-template-columns / grid-template-rows values such as 1.1fr 1fr, repeat(4,1fr), minmax(260px,.9fr) 2.4fr), gapRow / gapColumn (an Authored { n, u } length) and alignItems (normal, start, center, end, stretch, baseline). Every leaf is an Authored [{ if, is }] list, so a breakpoint switch is a condition, not a breakpoint-keyed map. Track values are rejected when they contain ;, {, } or <. Nothing paints until the group exists, so a block that never authored it keeps the display its own CSS gives it.
Two-column band: container: { display: [{ if: "*", is: "grid" }], columns: [{ if: "*", is: "1.1fr 1fr" }], gapColumn: [{ if: "*", is: { n: 80, u: "px" } }], alignItems: [{ if: "*", is: "center" }] }. One column on mobile: add { if: [{ bp: "mobile" }], is: "1fr" } ahead of the * entry on columns, and repeat gapColumn with the mobile length.
shell: {
box: {
container: {
display: [{ if: "*", is: "grid" }],
columns: [{ if: [{ bp: "mobile" }], is: "1fr" }, { if: "*", is: "1.1fr 1fr" }],
gapColumn: [{ if: "*", is: { n: 80, u: "px" } }],
alignItems: [{ if: "*", is: "center" }]
}
}
}position
Authored positioning on shell.box.position. Positioning is on iff this object is present. Set mode to static, relative, absolute, fixed, or sticky, with optional offset leaves (top, right, bottom, left, z) as Authored { n, u } lists.
shell: {
box: {
position: {
mode: [{ if: [{ bp: "mobile" }], is: "sticky" }, { if: "*", is: "relative" }],
top: [{ if: "*", is: { n: 0, u: "px" } }]
}
}
}overflow
CSS overflow on the decoration frame.
Options: visible, hidden, auto, clip
shell: {
box: {
overflow: [
{ if: "*", is: "hidden" }
]
}
}shell.box.clipPath
Optional CSS clip-path on the decoration frame. Clips the block itself: content, background layer and border all sit inside the frame, so one clip covers them. The paint-only variant is shell.background.clipPath; when both are authored the background is simply clipped twice. Values that contain ;, {, }, or < are ignored.
shell.box.clipPath: [
{ if: "*", is: "polygon(0 12px, 12px 0, 100% 0, 100% 100%, 0 100%)" }
]background
shell.background.width
Background span: page column, full viewport bleed, or bleed only toward the frame start (fullStart) or end (fullEnd). Background paints when authored content (color, image, gradient, video, or animation) is present.
Options: page, full, fullStart, fullEnd
shell.background.width: [
{ if: "*", is: "page" }
]shell.background.kind
Solid color, gradient, image, muted autoplay video, or canvas animation (particles / reactive grid).
Options: solid, gradient, image, video, animation
shell.background.kind: [
{ if: "*", is: "solid" }
]shell.background.color
Solid background color at shell.background.color. One authored color leaf: * is light, { theme: "dark" } is dark, and { on: "hover" } (also active, focus, selected) paints that interaction.
shell.background.color: [
{ if: [{ theme: "dark" }], is: "#111827" },
{ if: [{ on: "hover" }], is: "#f3f4f6" },
{ if: "*", is: "#ffffff" }
]shell.background.clipPath
Optional CSS clip-path on the decoration background layer. Empty means no clip. The content is not clipped. Values that contain ;, {, }, or < are ignored.
shell.background.clipPath: [
{ if: "*", is: "inset(0 round 24px)" }
]gradient
shell.background.gradient.type
Linear, radial, or conic gradient when shell.background.kind is gradient.
Options: linear, radial, conic
shell.background.gradient.type: [
{ if: "*", is: "linear" }
]shell.background.gradient.angle
Unit: deg
Linear gradient direction or conic start angle in degrees when shell.background.kind is gradient.
shell.background.gradient.angle: [
{ if: "*", is: 135 }
]shell.background.gradient.mirrorRtl
When true and the active website locale is right-to-left, linear and conic gradient angles use (360 − angle) mod 360. Off by default, so existing gradients stay the same. Radial gradients are unchanged.
shell.background.gradient.mirrorRtl: [
{ if: "*", is: true }
]shell.background.gradient.colors
Gradient stops with Authored light / dark color leaves and segment offsets (CSS % is the running sum). Stored the same way the decoration editor writes them.
shell.background.gradient.colors: [
{
light: [{ if: "*", is: "#2563eb" }],
dark: [{ if: "*", is: "#1e40af" }],
offset: [{ if: "*", is: 20 }]
},
{
light: [{ if: "*", is: "#93c5fd" }],
dark: [{ if: "*", is: "#60a5fa" }],
offset: [{ if: "*", is: 80 }]
}
]image
shell.background.image.src
Background image source when shell.background.kind is image.
shell.background.image.src: [
{ if: "*", is: "https://cdn.example/bg.jpg" }
]shell.background.image.overlay
Scrim color painted over an image background when this leaf is present. Stored at shell.background.image.overlay as an Authored color leaf.
shell.background.image.overlay: [
{ if: "*", is: "rgba(0,0,0,0.45)" }
]shell.background.image.alt
Shell.Background.Image.Alt.
shell.background.image.decorative
Shell.Background.Image.Decorative.
shell.background.image.credit
Shell.Background.Image.Credit.
shell.background.image.mode
How the background image is sized.
Options: cover, contain, repeat
shell.background.image.mode: [
{ if: "*", is: "cover" }
]shell.background.image.sizes
Shell.Background.Image.Sizes.
shell.background.image.slotShare
Shell.Background.Image.Slot Share.
shell.background.image.repeatSize
Unit: px
Tile size in pixels when background image mode is repeat.
shell.background.image.repeatSize: [
{ if: "*", is: 64 }
]shell.background.image.position
CSS background-position value.
shell.background.image.position: [
{ if: "*", is: "center" }
]motion
shell.background.motion.directionDeg
Unit: deg
Pan direction in degrees (0 = right). Motion paints when motion leaves are present.
shell.background.motion.directionDeg: [
{ if: "*", is: 0 }
]shell.background.motion.speed
Relative pan speed for seamless cycling.
shell.background.motion.speed: [
{ if: "*", is: 20 }
]shell.background.motion.rotateDegPerSec
Unit: deg
Continuous rotation speed in degrees per second (0 = off).
shell.background.motion.rotateDegPerSec: [
{ if: "*", is: 0 }
]shell.background.motion.animationMode
Particle field or reactive grid (filled cells or continuous outlines) when shell.background.kind is animation.
Options: particle, reactiveGrid
shell.background.motion.animationMode: [
{ if: "*", is: "particle" }
]video
shell.background.video.src
Video URL when shell.background.kind is video. Always muted, autoplay, plays inline; never captures focus.
shell.background.video.src: [
{ if: "*", is: "https://cdn.example/bg.mp4" }
]shell.background.video.source
file uses an uploaded video. youtube plays a muted covering embed from shell.background.video.youtubeUrl.
Options: file, youtube
shell.background.video.source: [
{ if: "*", is: "file" }
]shell.background.video.youtubeUrl
YouTube link or 11-character id when video source is youtube. Empty or invalid renders nothing.
shell.background.video.youtubeUrl: [
{ if: "*", is: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
]shell.background.video.fit
cover / fill use object-fit; repeat tiles frames on canvas.
Options: cover, fill, repeat
shell.background.video.fit: [
{ if: "*", is: "cover" }
]shell.background.video.loop
Loop the background video (default true).
shell.background.video.loop: [
{ if: "*", is: true }
]shell.background.video.repeatSize
Shell.Background.Video.Repeat Size.
particles
shell.background.particles.shape
Built-in shape or custom SVG for particles/grid cells.
Options: circle, square, roundedSquare, triangle, diamond, hexagon, star, cross, svg
shell.background.particles.shape: [
{ if: "*", is: "circle" }
]shell.background.particles.svgSrc
SVG URL when shape is svg.
shell.background.particles.svgSrc: [
{ if: "*", is: "https://cdn.example/shape.svg" }
]shell.background.particles.colorMode
solid tints shapes; fromAsset keeps SVG colors.
Options: solid, fromAsset
shell.background.particles.colorMode: [
{ if: "*", is: "solid" }
]shell.background.particles.color
Shell.Background.Particles.Color.
shell.background.particles.size
Unit: px
Base particle or cell size in pixels.
shell.background.particles.size: [
{ if: "*", is: 12 }
]shell.background.particles.jitter
Particle-only 0–1 randomization for count, size, lifetime, and speed.
shell.background.particles.jitter: [
{ if: "*", is: 0.2 }
]shell.background.particles.count
Shell.Background.Particles.Count.
shell.background.particles.lifetimeSec
Shell.Background.Particles.Lifetime Sec.
shell.background.particles.speed
Shell.Background.Particles.Speed.
shell.background.particles.animType
Shell.Background.Particles.Anim Type.
shell.background.particles.fromSide
Shell.Background.Particles.From Side.
shell.background.particles.toSide
Shell.Background.Particles.To Side.
grid
shell.background.grid.style
Reactive grid rendering: filled cells, or continuous shape outlines tiled edge-to-edge into one connected lattice that ripples around the cursor. Ignored for svg shapes, which always render as cells.
Options: cells, continuous
shell.background.grid.style: [
{ if: "*", is: "cells" }
]shell.background.grid.motionDirectionDeg
Shell.Background.Grid.Motion Direction Deg.
shell.background.grid.motionSpeed
Shell.Background.Grid.Motion Speed.
shell.background.grid.rotateDegPerSec
Shell.Background.Grid.Rotate Deg Per Sec.
shell.background.grid.hoverGrowLimitPct
Unit: %
Maximum cell size change at the pointer. Positive values grow cells; negative values shrink them. A value of 50 reaches 150% scale after the configured reaction time.
shell.background.grid.hoverGrowLimitPct: [
{ if: "*", is: 50 }
]shell.background.grid.hoverRotateLimitDeg
Unit: deg
Maximum cell rotation at the pointer. Positive values rotate clockwise; negative values rotate counterclockwise.
shell.background.grid.hoverRotateLimitDeg: [
{ if: "*", is: 0 }
]shell.background.grid.reactionTimeSec
Unit: s
Seconds for cells or the continuous-grid ripple to reach their configured hover limit, and to return after the pointer leaves.
shell.background.grid.reactionTimeSec: [
{ if: "*", is: 1 }
]shell.background.grid.hoverGrow
Shell.Background.Grid.Hover Grow.
shell.background.grid.hoverRotate
Shell.Background.Grid.Hover Rotate.
shell.background.grid.hoverColor
Shell.Background.Grid.Hover Color.
shell.background.grid.reactionSpeed
Shell.Background.Grid.Reaction Speed.
backdrop
shell.background.backdrop.blurPx
Shell.Background.Backdrop.Blur Px.
shell.background.backdrop.brightness
Shell.Background.Backdrop.Brightness.
shell.background.backdrop.contrast
Shell.Background.Backdrop.Contrast.
shell.background.backdrop.saturate
Shell.Background.Backdrop.Saturate.
shell.background.backdrop.grayscale
Shell.Background.Backdrop.Grayscale.
shell.background.backdrop.sepia
Shell.Background.Backdrop.Sepia.
shell.background.backdrop.hueRotateDeg
Shell.Background.Backdrop.Hue Rotate Deg.
border
borderColor
Border color. Border paints when border leaves are present. One authored color leaf: * is light, { theme: "dark" } is dark, and { on } is the interaction.
borderColor: [
{ if: [{ theme: "dark" }], is: "#374151" },
{ if: "*", is: "#e5e7eb" }
]borderStyle
CSS border style.
Options: solid, dashed, dotted
borderStyle: [
{ if: "*", is: "solid" }
]borderWidth
Unit: token
Border width token.
Options: none, sm, md, lg
borderWidth: [
{ if: "*", is: "sm" }
]borderRadius
Unit: token
Border radius token.
Options: none, sm, md, lg, xl, full
borderRadius: [
{ if: "*", is: "md" }
]radius
borderRadiusTopLeft
Border Radius Top Left.
borderRadiusTopRight
Border Radius Top Right.
borderRadiusBottomRight
Border Radius Bottom Right.
borderRadiusBottomLeft
Border Radius Bottom Left.
shell.border.mode
solid paints borderColor. gradient paints a two-stop gradient across the border band instead, using shell.border.gradient.*. Width, style and the box geometry are unchanged; the gradient is drawn with border-image, which does not follow border-radius — the block's background and content keep their corners.
Options: solid, gradient
shell.border.mode: [
{ if: "*", is: "gradient" }
]gradient
shell.border.gradient.from
First gradient stop. One authored color leaf: * is light, { theme: "dark" } is dark. Only painted when shell.border.mode is gradient.
shell.border.gradient.from: [
{ if: "*", is: "#2563eb" }
]shell.border.gradient.to
Second gradient stop. Same shape as shell.border.gradient.from; both stops are required before the gradient paints.
shell.border.gradient.to: [
{ if: "*", is: "#93c5fd" }
]shell.border.gradient.angle
Unit: deg
Gradient angle in degrees, clamped 0–360. Defaults to 90 (top to bottom).
shell.border.gradient.angle: [
{ if: "*", is: 90 }
]shadow
shadowValue
CSS box-shadow. Shadow paints when this leaf is present. One authored string leaf: * is light and { theme: "dark" } is dark. Empty uses theme shadow.md.
shadowValue: [
{ if: [{ theme: "dark" }], is: "0 8px 24px rgba(0, 0, 0, 0.45)" },
{ if: "*", is: "0 8px 24px rgba(0, 0, 0, 0.12)" }
]effects
opacity
Opacity.
filterBlurPx
Filter Blur Px.
filterBrightness
Filter Brightness.
filterContrast
Filter Contrast.
filterSaturate
Filter Saturate.
filterGrayscale
Filter Grayscale.
filterSepia
Filter Sepia.
filterHueRotateDeg
Filter Hue Rotate Deg.
filterDropShadowOffsetX
Filter Drop Shadow Offset X.
filterDropShadowOffsetY
Filter Drop Shadow Offset Y.
filterDropShadowBlur
Filter Drop Shadow Blur.
filterDropShadowColor
Filter Drop Shadow Color.
mixBlendMode
Mix Blend Mode.
scrollAnimation
scrollAnimationType
Enter-on-scroll animation preset. Scroll animation paints when these leaves are present.
Options: fadeIn, slideInBottom, slideInTop, slideInLeft, slideInRight, zoomIn, zoomOut, rotateIn, rotateOut, bounceIn, bounceOut, pulse
scrollAnimationType: [
{ if: "*", is: "fadeIn" }
]scrollAnimationDuration
Unit: ms
Animation duration in milliseconds.
scrollAnimationDuration: [
{ if: "*", is: 600 }
]scrollAnimationDelay
Unit: ms
Animation delay in milliseconds.
scrollAnimationDelay: [
{ if: "*", is: 0 }
]scrollAnimationStart
Scroll Animation Start.
scrollAnimationTiming
Scroll Animation Timing.
cursorTilt
cursorTiltIntensity
Strength of the cursor tilt effect. Cursor tilt paints when this leaf is present.
cursorTiltIntensity: [
{ if: "*", is: 8 }
]wander
wanderSpeed
0–100 scaler for wander velocity. Wander paints when wander leaves are present.
wanderSpeed: [
{ if: "*", is: 40 }
]wanderJitter
0–100; low biases longer segment durations.
wanderJitter: [
{ if: "*", is: 40 }
]wanderTurnRadius
0–100; low keeps headings closer to the previous.
wanderTurnRadius: [
{ if: "*", is: 50 }
]wanderTurnSmoothness
0–100; how softly headings blend between segments.
wanderTurnSmoothness: [
{ if: "*", is: 40 }
]wanderLimits
Bounce against the parent box or the document viewport.
wanderLimits: [
{ if: "*", is: "parent" }
]shine
shell.shine.enabled
Sweep a skewed highlight band across the block. Stored as one nested group at shell.shine; enabled: false turns the sweep off without deleting the other leaves. The overlay clips itself, so shell.box.overflow is untouched and the band never enters the hit target or the accessibility tree.
shell.shine: {
enabled: [{ if: "*", is: true }]
}shell.shine.color
Highlight color for the sweep. One authored color leaf: * is light, { theme: "dark" } is dark. Default rgba(255,255,255,0.55).
shell.shine.color: [
{ if: "*", is: "rgba(255,255,255,0.55)" }
]shell.shine.duration
Unit: ms
One full cycle in ms. The band completes its sweep in the first 18% of the cycle and rests off-screen for the remainder. Clamped 200–20000.
shell.shine.duration: [
{ if: "*", is: 6000 }
]shell.shine.delay
Unit: ms
Delay before the first sweep, in ms. Clamped 0–20000.
shell.shine.delay: [
{ if: "*", is: 1500 }
]shell.shine.width
Unit: %
Band width as a percentage of the block. Clamped 5–100.
shell.shine.width: [
{ if: "*", is: 40 }
]shell.shine.angle
Unit: deg
Gradient angle of the highlight band, in degrees. Clamped 0–360.
shell.shine.angle: [
{ if: "*", is: 100 }
]transform
transformRotateX
Unit: deg
Rotation around the X axis in degrees. Transform paints when transform leaves are present.
transformRotateX: [
{ if: "*", is: 0 }
]transformRotateY
Unit: deg
Rotation around the Y axis in degrees.
transformRotateY: [
{ if: "*", is: 0 }
]transformRotateZ
Unit: deg
Rotation around the Z axis in degrees.
transformRotateZ: [
{ if: "*", is: 0 }
]transformTranslateX
Unit: px
Horizontal translation in pixels.
transformTranslateX: [
{ if: "*", is: 0 }
]transformTranslateY
Unit: px
Vertical translation in pixels.
transformTranslateY: [
{ if: "*", is: 0 }
]transformTranslateZ
Unit: px
Depth translation in pixels.
transformTranslateZ: [
{ if: "*", is: 0 }
]transformScale
Unit: ratio
Uniform scale factor (unitless).
transformScale: [
{ if: "*", is: 1 }
]transformPerspective
Unit: px
CSS perspective distance in pixels.
transformPerspective: [
{ if: "*", is: 800 }
]pointerEvents
Whether the decoration frame receives pointer events. Use none for full-page decorative backgrounds so clicks pass through.
Options: auto, none
shell: {
pointerEvents: [
{ if: "*", is: "auto" }
]
}group
True, or a name. The frame sets data-group so a descendant variant such as group-hover or group-hover:name can match this block's pointer state.
shell: {
group: [
{ if: "*", is: "card" }
]
}peer
True, or a name. The frame sets data-peer. A following sibling's peer-hover or peer-hover:name variant matches it.
shell: {
peer: [
{ if: "*", is: "trigger" }
]
}Examples
Hide on mobile
{
"shell": {
"visibility": [
{
"if": [
{
"bp": "mobile"
}
],
"is": false
},
{
"if": "*",
"is": true
}
]
}
}Signed-in only + light padding
{
"shell": {
"visibility": [
{
"if": [
{
"auth": "anonymous"
}
],
"is": false
},
{
"if": "*",
"is": true
}
],
"box": {
"padding": {
"top": [
{
"if": "*",
"is": {
"n": 16,
"u": "px"
}
}
],
"right": [
{
"if": "*",
"is": {
"n": 16,
"u": "px"
}
}
],
"bottom": [
{
"if": "*",
"is": {
"n": 16,
"u": "px"
}
}
],
"left": [
{
"if": "*",
"is": {
"n": 16,
"u": "px"
}
}
]
}
}
}
}