Dev Helpers
← Back

Clip a gradient to large text

Clip a gradient to large text with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    width: fit-content;
    background-image: linear-gradient(to right, #7c2d12, #581c87);
    background-clip: text;
    color: transparent;
    font-size: 2rem;
    font-weight: 800;
  }
</style>
<div class="demo">Clip a gradient to large text</div>