Open this example in the interactive library
Source code
<style>
.demo {
height: 7rem;
overflow: auto;
}
.demo .tile {
position: sticky;
top: 0;
}
</style>
<div class="demo">
<div class="tile">Pinned heading</div>
<p style="height: 12rem">
Scroll this panel to see the heading stay in place.
</p>
</div>