Motion Primitives
BismillahCSS primitives provide high-level APIs for common futuristic UI behaviors.
Spotlight (bSpotlight)
Follows the mouse position to create a circular glow on an element.
SPOTLIGHT AREA
import { bSpotlight } from 'bismillahcss';
const el = document.querySelector('.b-spotlight');
bSpotlight(el);Magnetic (bMagnetic)
Attracts the element toward the cursor, creating satisfying spatial feedback.
import { bMagnetic } from 'bismillahcss';
bMagnetic(buttonEl, 0.5); // 1.0 is max strengthAmbient Glare (bGlare)
Simulates a light source reflecting off a surface as the mouse moves.
import { bGlare } from 'bismillahcss';
bGlare(cardEl);