unslopkit

Components / Tooltips and popovers

Copy with confirmation

A copy button whose tip says Copy, then turns accent and says Copied with a check once your code adds the done class.

Copy
Copied
Drawn in your kit, Plain.Change the look

The code

Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.

<div class="ukc-tooltip-copy-confirm">
<div class="rows">
  <div class="row">
    <label for="ukc-tooltip-copy-confirm-link">Share link</label>
    <div class="box"><input id="ukc-tooltip-copy-confirm-link" readonly value="halden.app/j/4821-alder"><span class="cp"><button type="button" aria-label="Copy share link" aria-describedby="ukc-tooltip-copy-confirm-tip-link"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="8" width="12" height="12" rx="1"/><path d="M16 8V4H4v12h4"/></svg></button><span class="tip" role="tooltip" id="ukc-tooltip-copy-confirm-tip-link" aria-live="polite">Copy</span></span></div>
  </div>
  <div class="row">
    <label for="ukc-tooltip-copy-confirm-code">Crew invite code</label>
    <div class="box"><input id="ukc-tooltip-copy-confirm-code" readonly value="HLD-7Q2K"><span class="cp done show"><button type="button" aria-label="Copy crew invite code" aria-describedby="ukc-tooltip-copy-confirm-tip-code"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></button><span class="tip" role="tooltip" id="ukc-tooltip-copy-confirm-tip-code" aria-live="polite"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg> Copied</span></span></div>
  </div>
</div>
</div>

More tooltips and popovers

All 26
  • Field format hint

  • Mara Reyes2h ago

    @Dana WhitfieldDana WhitfieldElectrician · Crew B At Birch Street until 4 pm Usually replies within an hour 14 jobs with your crew can you check the panel before Friday's inspection?

    User hover card

  • Invoices

    Feature callout

  • Full name on overflow

  • Draft saved 2 min ago

    Before you can send Line items added Client email is missing No due date yet

    Why it is disabled

  • View menu with checks