buttons

Popover Button

An interactive action button featuring an animated floating popover tooltip on hover and keyboard focus.

#button#popover#tooltip#popup#hover#action
/* Wrapper */
.popover-btn-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Floating Tooltip Card */
.popover-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.popover-btn-wrapper:hover .popover-tooltip,
.popover-btn-wrapper:focus-within .popover-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.popover-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #171918;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
}

.popover-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #10b981;
}

.popover-badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.popover-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #171918;
}

/* Button */
.popover-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #171918;
  border-radius: 12px;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.18);
  transition: all 0.2s ease;
}

.popover-button:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.24);
}

.popover-button:active {
  transform: scale(0.98);
}
PLAYGROUND

Customize

Button color#171918
Corner radius12px
ACCESSIBILITY

Built for real interfaces

Decorative elements should not be the only way important information is communicated.

RESPONSIVE USAGE

Works at every width

Use flexible sizing and sensible boundaries so components adapt smoothly across screens.

QUICK START
  1. 1Copy the HTML into your page.
  2. 2Add the CSS to your stylesheet.
  3. 3Adjust the values to match your design.
No dependencies required.

KEEP EXPLORING

Related components