axi0motion

Silk

Folds of fabric ripple slowly across a background, with a fine film grain.

  • element
  • webgl
  • fabric
  • ambient
  • hero
  • since 0.1

Background Studio: tune it below, then copy the code

Your system asks for reduced motion: the demo shows its final state and nothing moves.

Live demo

Silk example

Controls

1
1
0 deg
1

Code

It follows the controls above: change an option and the code changes with it.

<link rel="stylesheet" href="/axi0/motion/motion.css?v=6">
<script src="/axi0/motion/motion.js?v=10" defer></script>

<axi0-silk cover color="#7b6cff"></axi0-silk>

The wrappers: Silk.tsx (React, TypeScript) and Silk.vue (Vue). Both render the same attributes as the HTML; the loader does the rest.

Options

AttributeDefaultWhat it does
color#7b6cffthe fabric's color
speed1how fast the folds move
scale1larger numbers make smaller folds
rotation0turns the pattern, in degrees
grain1film grain (0 turns it off)
coverfalsefill the nearest positioned parent, behind its content

Accessibility

The same runner as aurora: the loop stops off screen and in hidden tabs, reduced motion draws one still frame. It paints an opaque sheet, so put light text over it.

Size

silk.js is 0.7 KB gzip, with gl.js 2.1 KB it needs. A page loads the loader (2.7 KB) and core.js (1.4 KB) once, whatever it uses.