Brand Background
Sets the Infinity Band behind a marketing section or card: a vector band, blurred or sharp, or a line shape, sharp at any size.
When to use
- A large panel behind cards, a closing call to action, a newsletter strip or a dark section on a marketing page: use
BandBackground. - A card that needs the line language behind its copy: use
LineBackground. - A hero with no Rive scene: a blurred
BandBackground(blur40 and up), cropped on the side away from the copy. The hero then drops its line accent, since a line keeps clear of other graphics.
When not to use
- A hero with a Rive scene: the scene is its background. See Rive scenes.
- A product (
base-luma) surface: product apps don't use the Infinity Band as a background. - A photo: use an image. See Imagery.
Install
npx shadcn@latest add @clinia/brand-backgroundHealth data, turned into a patient story
Focus on the Vitals
The principle of essentialism.
Usage
import { BandBackground, LineBackground } from "@/components/ui/brand-background";
<BandBackground band="twist" ground="remedy" glow blur={0} x={48} y={-30} scale={62} rotate={-20} className="rounded-lg p-10">
<h2>Health data, turned into a patient story</h2>
</BandBackground>
<LineBackground line={10} ground="noble" color="beige-3" x={-3} y={49} scale={160} className="rounded-lg p-5">
<p>Focus on the Vitals</p>
</LineBackground>Clinia rules
- Place the art so the container crops it on at least two sides, with the copy on the flat part of the ground. Copy never runs across the band.
blursets the look: 0 for a sharp band with itsglow, 6 for the background field, 40 and up for a blurred sweep.- Use
glowon light grounds only: on Infinite the spheres turn to haze. - One band per section. A card below can carry a line.
- The art comes from
@clinia/infinity-band, so the band and line geometry is never redrawn.
Do and don't
Health data, turned into a patient story
Health data, turned into a patient story
Accessibility
Built in
- The art is decorative: it renders with
alt=""andaria-hidden, so a screen reader reads only the content on top. - The ground sets the theme of its content: a light ground pins it to the light theme and Infinite to the dark one, so
text-foregroundkeeps its contrast in both site themes.
Your responsibility
- Check the copy against the ground, and against the band where they come close. Keep body text off the band entirely.
How to test
- With a screen reader, move through the section: only its content is announced, never the art.
- Switch the site theme: the content on a light ground stays dark, and on Infinite it stays light.
API
BandBackground
| Prop | Values | Default | Description |
|---|---|---|---|
| x | number | -20 | Left edge of the art, in percent of the container's width. Values past 0 to 100 push it off the edge, where the container crops it. |
| y | number | 0 | Top edge of the art, in percent of the container's height. |
| scale | number | 140 | Width of the art, in percent of the container's width. |
| band | twistring | twist | The shape-language form: the tapered |
| ground | sereneremedybeige-3remedy-darkaurathistlemendnobleinfinite | – | The brand surface under the band in the light theme. In the dark theme it turns Infinite |
| rotate | number | 0 | Turns the band, in degrees. |
| blur | number | 6 | Softens the band, in pixels: 0 keeps it sharp, 6 is the background field, 40 and up a blurred sweep. The dark theme raises it to at least 3px. |
| glow | boolean | false | Adds the brand compositions' glow spheres behind the band, in Mend |
LineBackground
| Prop | Values | Default | Description |
|---|---|---|---|
| color | serenebeige-3mendnoblevitaltrustpurple-5 | vital | The line's brand colour. A |
| x | number | -30 | Left edge of the art, in percent of the container's width. Values past 0 to 100 push it off the edge, where the container crops it. |
| y | number | 30 | Top edge of the art, in percent of the container's height. |
| scale | number | 160 | Width of the art, in percent of the container's width. |
| line | number | 1 | Which of the twelve line-language shapes, 1 to 12, as in |
| ground | sereneremedybeige-3remedy-darkaurathistlemendnobleinfinite | – | The brand surface under the line. In the dark theme |
| keepAspect | boolean | false | Keeps the line's own proportions: |