Skip to main content

atoms

Gel

An absolutely positioned decorative overlay whose corners are animated by the choreography on scroll.

Specimens

Primary gel The choreography masks and animates it, which docs pages don't load, so this shows the unmasked box that fills its frame.
{{ Gel.render({ id: "spec-gel-0", color: "gel-primary" }) }}
Second gel
{{ Gel.render({ id: "spec-gel-1" }) }}
Direction and fade A gel that runs to the bottom and holds its light colour past a medium fade.
{{ Gel.render({
  id: "spec-gel-2",
  color: "gel-accent",
  direction: "gel-bottom",
  fade: "gel-fade-md"
}) }}
Opacity The gradient colours mix with transparent. The element's own opacity stays with the choreography.
{{ Gel.render({
  id: "spec-gel-3",
  color: "gel-primary",
  opacity: "gel-opacity-50"
}) }}
Blend mode Normal blending paints the gradient solid. The default, multiply, darkens what is behind it.
{{ Gel.render({
  id: "spec-gel-4",
  color: "gel-accent",
  blend: "gel-blend-normal"
}) }}

Params

ParamTypeDescription
idstringElement id. Must match the gel arrangement keys used by the choreography. Defaults to gel-default.
colorstringColour class, next to gel: gel-primary, gel-secondary, gel-accent, gel-neutral or gel-neutral-light. Defaults to gel-primary.
directionstringOptional direction class: gel-top, gel-bottom, gel-left, gel-right or a corner such as gel-bottom-left. The stylesheet default is gel-top.
fadestringOptional fade distance class: gel-fade-xs to gel-fade-xl, gel-fade-full, or an arbitrary value such as gel-fade-[30%]. The stylesheet default is gel-fade-full.
opacitystringOptional gradient opacity class: gel-opacity-<n> for 0 to 100, or an arbitrary value such as gel-opacity-[35%]. The stylesheet default is 100. It tints the gradient and is not the element’s opacity, which the choreography owns.
opacityEndstringOptional gradient end opacity class: gel-opacity-end-<n> for 0 to 100, or an arbitrary value such as gel-opacity-end-[35%]. The stylesheet default is 0, so the gradient fades to transparent at the fade distance. Past that point the gel holds this opacity.
blendstringOptional blend mode class: gel-blend-<mode>, for example gel-blend-screen or gel-blend-normal. The stylesheet default is multiply. An arrangement’s blendMode is set inline by the gel manager and still overrides it.
debugboolOptional, dev only. true adds gel-debug, a black and yellow line where the gradient ends (--gel-end, set by fade). The line marks where the gradient reaches its end opacity (transparent by default). Remove before committing.

Notes

The id must match an arrangement key used by the gel choreography, such as bg-gel-0. The specimens use other ids so they don't collide with the page.