capsule

A rounded glass pill lying on a diagonal. Soft and friendly, it reads well small.

Options

AttributeTypeDefaultRangeDescription
spanfloat0.70 to 0.9Length
radiusfloat0.270.12 to 0.4Radius
colorcolor#9bd1ffany CSS color, including color(display-p3 r g b)Accent color of the object.
sizelength160pxany CSS lengthWidth and height of the object box.
animationlistnoneidle, spin, pulse, breathe, floatSpace separated animations, composed in order.
speednumber10.1 to 3Multiplies animation time.
statekeywordidleoff, idle, busy, activeBrightness level, eased on change.
effectlistnoneglow, beam, rgb-split, pixelate, dither, scanlines, halftone, outline, grain, vignette, chroma, ripple, defocusSpace separated post effects on this object only.
shadingkeywordautoauto, glass, matte, cel, clay, metalHow the surface takes light. auto is glass in the dark theme and matte in the light one; a scene's shading is the default for its children.
gravitykeywordorbitcenter, orbit, fall, noneRole in a gravity scene.

Notes

A rounded glass pill lying on a diagonal. It is the softest shape in the set and stays legible at small sizes, which makes it a good satellite around a larger center.

<sd-scene>
  <sd-capsule color="color(display-p3 0.5 1 0.85)" animation="float"></sd-capsule>
</sd-scene>

License

MIT. Use it anywhere, credit appreciated.