ValyroUI Русская версия

Background Pattern

Fading dot, grid and line backgrounds. Pro · Effects › Backgrounds

A dot, grid, line or diagonal pattern behind content, faded out by a radial mask so it reads as texture rather than a box. The optional drift moves the pattern by one cell per cycle with a transform, so it is seamless and costs no repaints; it pauses off screen and with reduced motion.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add background-pattern
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { BackgroundPattern } from 'valyro-ui-pro';

Props

PropTypeDefault
variant'dots' | 'grid' | 'lines' | 'diagonal''grid'Pattern drawn per cell: dots, a square grid, horizontal lines or 45° diagonal stripes.
sizenumber24Size of one cell of the pattern, px.
fade'center' | 'top' | 'bottom' | 'none''center'Where the pattern stays visible; it fades out radially away from there. none covers the whole area evenly.
animatedbooleanfalseDrift the pattern slowly.

Related components

Previous: Meteors · Next: Particles · All Effects