Dev Helpers
← Back

Place a badge in a corner

Place a badge in a corner with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    position: relative;
    min-height: 4rem;
  }
  .demo .tile {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }
</style>
<div class="demo">Draft <span class="tile">Beta</span></div>