Rebar UI

1.1

imitation

BackdropSection

A section with art behind it and light text on top.

Project heroRounded panel with a start-side scrim

Harbour rebrand

Identity, site and launch kit for the harbour trust.

Soft scrim

Soft

Strong scrim

Strong

No scrim

None

Art as the section background (imageMode="background")

Painted as a CSS background

Full-bleed

Square corners

In context

Launch pageA strong-scrim band between two plain sections

Launch is 24 Oct. Here is where it stands.

84% done

Identity and site are in review; the launch kit ships next week.

Owner: Maya Chen.

Props

PropTypeRequiredDefault
image{ src: string; alt?: string | undefined; }Yes—
scrim"strong" | "none" | "soft" | "start" | "custom" | undefinedNosoft
roundedboolean | undefinedNofalse
insetboolean | undefinedNotrue
imageMode"img" | "background" | undefinedNoimg

Scrims

soft darkens lightly top to bottom, strong more, start is darker on the text side, none leaves the art alone. Set the colour with --rebar-backdrop-scrim-color; rounded gives an inset panel (--rebar-backdrop-section-radius). Use art at least as wide as the section.

Accessibility

The image is decorative by default (alt="", aria-hidden); pass image.alt only if it carries information. Check text contrast against the darkest scrim you can afford, not the average pixel.

data-rebar-* attributes

data-rebar-component="backdrop-section", data-rebar-scrim and data-rebar-rounded on the root; data-rebar-part values image, scrim and content.

Migrating to Ant Design

Not codemod-covered. Ant Design has no equivalent; this is a bespoke section.

inset

inset={false} drops the section's own side margin (when rounded) and padding, so an app can lay it out full-bleed and pad it itself. Default true keeps the current spacing.

<BackdropSection image={{ src }} inset={false}>...</BackdropSection>

imageMode="background"

imageMode="background" draws the art and the scrim as CSS background layers of the section itself (no <img>, no scrim element), so a rounded edge anti-aliases like a plain background; the art is decorative. Tokens: --rebar-backdrop-image-bg (the colour behind the art, default the inverse surface) and --rebar-backdrop-image-repeat (default no-repeat). Use scrim="custom" with --rebar-backdrop-scrim-background for the app gradient. Also: tertiary link Buttons honour --rebar-button-tertiary-color, classic primary Buttons --rebar-classic-button-bg, and Input has --rebar-input-invalid-border-color / -shadow / -focus-shadow.

Tokens

Custom properties, set on the component or any ancestor. The default is what applies when one is unset. 3 of 9 were added in 1.1.0 and are marked.

PropertyDefault
--rebar-backdrop-imageunset1.1
--rebar-backdrop-image-bgvar(--rebar-color-bg-inverse, #1e1e1e)1.1
--rebar-backdrop-image-repeatno-repeat1.1
--rebar-backdrop-scrim-backgroundtransparent
--rebar-backdrop-scrim-color#000000
--rebar-backdrop-section-content-padding0
--rebar-backdrop-section-margin-inlinevar(--rebar-space-md, 16px)
--rebar-backdrop-section-paddingvar(--rebar-space-3xl, 64px) var(--rebar-space-lg, 24px)
--rebar-backdrop-section-radiuscalc(var(--rebar-radius, 4px) * 8)