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
| Prop | Type | What it does |
|---|---|---|
shape | DecalShape | square, triangle, chevron or dash. Defaults to square. |
color | DecalColor | orange, teal or pink. Without it the shape uses the text color. |
size | string | Any CSS length. Defaults to 0.6em. |
rotate | number | Degrees. Defaults to 0. |