Skip to content

Repositioning Arrow Tooltip

A copy-paste onboarding & coachmarks component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Onboarding & CoachmarksHTMLCSSany framework

Copy into your project

HTML
<!-- Repositioning Arrow Tooltip — coachmark whose arrow snaps to a new anchor to show it can auto-reposition around a target -->
<div class="nuda-ob2-arrow-tooltip" role="dialog" aria-modal="true" aria-label="Feature tip, step 1 of 4">
  <span class="nuda-ob2-arrow-tooltip__arrow" aria-hidden="true"></span>
  <span class="nuda-ob2-arrow-tooltip__step">Step 1 of 4</span>
  <h4 class="nuda-ob2-arrow-tooltip__title">Drag files here</h4>
  <p class="nuda-ob2-arrow-tooltip__body">Drop any file onto the panel to start an upload.</p>
  <div class="nuda-ob2-arrow-tooltip__actions">
    <button class="nuda-ob2-arrow-tooltip__dismiss" type="button" aria-label="Dismiss tip">Got it</button>
  </div>
</div>
CSS
.nuda-ob2-arrow-tooltip {
  position: relative;
  width: 100%;
  max-width: 280px;
  padding: 16px;
  background: rgba(20,20,24,.96);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  box-shadow: 0 20px 44px -12px rgba(0,0,0,.6);
  animation: nuda-ob2-arrow-tooltip-in .45s cubic-bezier(.34,1.56,.64,1);
}

.nuda-ob2-arrow-tooltip__arrow {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(20,20,24,.96);
  border-right: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
  transform: translateX(-50%) rotate(45deg);
  animation: nuda-ob2-arrow-tooltip-move 3.2s steps(1,end) infinite;
}

.nuda-ob2-arrow-tooltip__step {
  display: inline-block;
  font: 800 10px ui-sans-serif,system-ui;
  color: #e4ff54;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.nuda-ob2-arrow-tooltip__title {
  margin: 0 0 4px;
  font: 700 14px ui-sans-serif,system-ui;
  color: #fafafa;
}

.nuda-ob2-arrow-tooltip__body {
  margin: 0 0 12px;
  font: 500 12px/1.5 ui-sans-serif,system-ui;
  color: #a1a1aa;
}

.nuda-ob2-arrow-tooltip__actions {
  display: flex;
  justify-content: flex-end;
}

.nuda-ob2-arrow-tooltip__dismiss {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: #e4ff54;
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  font: 700 11px ui-sans-serif,system-ui;
  cursor: pointer;
  transition: transform .2s,box-shadow .25s;
}

.nuda-ob2-arrow-tooltip__dismiss:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(228,255,84,.4);
}

.nuda-ob2-arrow-tooltip__dismiss:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

@keyframes nuda-ob2-arrow-tooltip-in {
  from {
    opacity: 0;
    transform: scale(.92) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes nuda-ob2-arrow-tooltip-move {
  0%,40% {
    transform: translateX(-140%) rotate(45deg);
  }
  50%,90% {
    transform: translateX(40%) rotate(45deg);
  }
  100% {
    transform: translateX(-140%) rotate(45deg);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ob2-arrow-tooltip {
    animation: none;
  }
  .nuda-ob2-arrow-tooltip__arrow {
    animation: none;
    transform: translateX(-50%) rotate(45deg);
  }
}

How to use Repositioning Arrow Tooltip

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 onboarding & coachmarks components

← Browse all NudaUI components