Skip to content

Calendar Event Pill

A copy-paste calendars & date pickers component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Calendars & Date PickersHTMLCSSany framework
10:30Design review

Copy into your project

HTML
<div class="nuda-event-pill">
  <span class="nuda-event-pill__time">10:30</span>
  <span class="nuda-event-pill__title">Design review</span>
  <span class="nuda-event-pill__bar"></span>
</div>
CSS
.nuda-event-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 18px;
  background: rgba(228,255,84,.08);
  border: 1px solid rgba(228,255,84,.18);
  border-radius: 10px;
  color: #fafafa;
  font-size: 12px;
  width: 100%;
  max-width: 240px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s,box-shadow .25s,border-color .25s;
}

.nuda-event-pill:hover {
  transform: translateX(2px);
  border-color: #e4ff54;
  box-shadow: 0 6px 18px -10px rgba(228,255,84,.5);
}

.nuda-event-pill__time {
  color: #e4ff54;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nuda-event-pill__title {
  color: #a0a0a8;
  font-weight: 500;
}

.nuda-event-pill__bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #e4ff54;
  animation: _eventBar 1.6s ease-in-out infinite alternate;
}

@keyframes _eventBar {
  from {
    box-shadow: 0 0 8px #e4ff54;
  }
  to {
    box-shadow: 0 0 14px #e4ff54;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-event-pill__bar {
    animation: none;
  }
}

How to use Calendar Event Pill

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More calendars & date pickers components

← Browse all NudaUI components