Stage 10 · Component

Decal

One shape, one color, placed by hand.

Live

ChevronsDecal repeated, pointing forward.
DashesThe same idea with the dash shape.
DecalStripA fixed pattern used as a divider.

Reasoning

Why it exists

Every square, triangle, chevron and dash on the site is this component. One primitive keeps the shapes consistent and makes a new pattern a matter of listing shapes, not drawing them.

Built on top

Chevrons and Dashes repeat it in a row, and DecalStrip lays out a fixed pattern used as a divider. Without a color it takes the current text color.

Leave it out when

The mark has to mean something. Decals are decoration and are hidden from assistive technology.

Props

PropTypeWhat it does
shapeDecalShapesquare, triangle, chevron or dash. Defaults to square.
colorDecalColororange, teal or pink. Without it the shape uses the text color.
sizestringAny CSS length. Defaults to 0.6em.
rotatenumberDegrees. Defaults to 0.

Sourcepackages/ui/src/components/Decal.astro