Button with a label

The button reads data-bs-target and swaps clipboard-label for clipboard-feedback.

Button with an icon

An icon-only button needs an aria-label and a hidden word for the announcement.

Icon inside the field

With input-group-flat the button sits in an input-group-text, so it looks like part of the field.

Green confirmation

The feedback element takes any utility, so a text-green check confirms the copy in colour.

A literal string

Use data-bs-text when the text is not on the page.

Any element

A target that is not a field is copied from its text.

npm install @tabler/core

How long it lasts

Set data-bs-delay in milliseconds. The default is 2000.