SoapBubble creates the theme’s characteristic iridescent bubble shapes using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/artisan-developer/llms.txt
Use this file to discover all available pages before exploring further.
.soap-bubble CSS utility class. The illusion of a real soap bubble surface is built from three cooperating techniques: a radial gradient that shifts from near-opaque cream at the top-left highlight down through translucent cyan, magenta, and teal tones; a set of five layered box shadows that simulate the coloured light refraction seen in real soap films; and a backdrop-filter: blur(2px) that gives the circle a faint glass quality by softening whatever sits behind it. Together these produce a convincing iridescent sphere without any canvas or WebGL code.
CSS utility
The visual surface of every bubble is controlled by the.soap-bubble class in assets/main.css:
30% 30% — offset toward the upper-left — to mimic the specular highlight of a sphere lit from above. The box shadow layers break down as follows:
| Shadow | Colour | Purpose |
|---|---|---|
inset 0 0 20px #fffc | near-white | Overall inner brightness, gives the sphere a luminous core |
inset 10px 0 40px #d946ef4d | magenta 30% | Left-side iridescent colour cast |
inset -10px 0 40px #06b6d44d | cyan 30% | Right-side iridescent colour cast |
inset 0 -10px 40px #fb923c33 | orange 20% | Bottom warmth, simulates light bending around the curve |
0 4px 20px #0000000d | black 5% | Subtle drop shadow to ground the sphere on the page |
1px solid rgba(255, 255, 255, 0.5) border traces the rim and adds a crisp edge highlight.
The component also renders a static div positioned at top: 4, left: 8 with w-1/3 h-1/4 bg-white/40 rounded-full blur-md rotate-[-45deg] — a blurred ellipse that acts as a fixed specular glint, ensuring the sphere reads as three-dimensional even without lighting calculations.
Animation
Soap bubble elements combine two CSS animations fromassets/main.css:
.animate-wobble — morphs the border-radius between elliptical shapes on an 8-second ease-in-out loop, making the bubble feel like it is slowly changing shape under surface tension:
.animate-float — vertically translates the bubble with a slight rotation oscillation on a 6-second ease-in-out loop, producing a drifting, weightless quality:
y: 100, opacity: 0 and animates to its floating position once the page loads, with opacity transitioning in over 1 second. The stagger is controlled by the delay prop passed from the parent page.
On hover, SoapBubble scales up to 1.05 and suspends the wobble animation via group-hover:animate-none, allowing the visitor to read the quote text revealed inside.
Usage context
SoapBubble is used on the testimonials page as a creative alternative to traditional quote cards. Each bubble contains a client quote, attribution name, and role. The text is hidden at rest (opacity 0) and revealed on hover (opacity 100), turning the bubble into a reveal interaction. Bubbles are sized using asize prop that maps to Tailwind width/height classes: sm (64 × 64), md (80 × 80), and lg (96 × 96). They are positioned using Framer Motion’s x and y offsets to scatter them naturally across the hero area, and they do not participate in document flow.
The
backdrop-filter: blur(2px) property applies a subtle blur to any content that lies directly behind the bubble. This is intentional — it contributes to the glass-like appearance. However, if a SoapBubble is placed directly over a block of body text, the blur will reduce that text’s readability. Keep bubbles positioned over decorative backgrounds or open space rather than over prose content.