Dev Helpers
← Back

Rail of fixed swatches

Rail of fixed swatches with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 4rem;
    overflow: auto;
    gap: 0.5rem;
  }
</style>
<div class="demo"><b>Slate</b><b>Clay</b><b>Ink</b><b>Ivory</b></div>