Announcement pill
The split "Introducing … | Learn more ↗" pill from dub.co's hero, rebuilt in plain HTML/CSS.
<a class="pill" href="#">
<span class="pill__label">Introducing our Startup Program</span>
<span class="pill__action">Learn more <span aria-hidden="true">↗</span></span>
</a>.pill {
display: inline-flex;
align-items: stretch;
border: 1px solid #e5e5e5;
border-radius: 999px;
background: #fff;
font: 500 13px/1 Inter, system-ui, sans-serif;
color: #171717;
text-decoration: none;
box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
overflow: hidden;
transition: border-color 0.15s, box-shadow 0.15s;
}
.pill:hover {
border-color: #d4d4d4;
box-shadow: 0 2px 6px rgb(0 0 0 / 0.06);
}
.pill__label,
.pill__action {
padding: 8px 12px 8px 16px;
}
.pill__action {
border-left: 1px solid #e5e5e5;
padding-right: 14px;
color: #737373;
font-weight: 400;
}
.pill:hover .pill__action {
color: #171717;
}<!--
title: Announcement pill
author: archive
tags: [badge, pill, dub, announcement]
source: https://dub.co
description: The split "Introducing … | Learn more ↗" pill from dub.co's hero, rebuilt in plain HTML/CSS.
-->
<a class="pill" href="#">
<span class="pill__label">Introducing our Startup Program</span>
<span class="pill__action">Learn more <span aria-hidden="true">↗</span></span>
</a>
<style>
.pill {
display: inline-flex;
align-items: stretch;
border: 1px solid #e5e5e5;
border-radius: 999px;
background: #fff;
font: 500 13px/1 Inter, system-ui, sans-serif;
color: #171717;
text-decoration: none;
box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
overflow: hidden;
transition: border-color 0.15s, box-shadow 0.15s;
}
.pill:hover {
border-color: #d4d4d4;
box-shadow: 0 2px 6px rgb(0 0 0 / 0.06);
}
.pill__label,
.pill__action {
padding: 8px 12px 8px 16px;
}
.pill__action {
border-left: 1px solid #e5e5e5;
padding-right: 14px;
color: #737373;
font-weight: 400;
}
.pill:hover .pill__action {
color: #171717;
}
</style>Stored at src/content/snippets/badges/announcement-pill.html