Toggletip
A small ⓘ button that opens a help bubble on click or tap; the bubble can hold links and is announced to screen readers.
c2-toggletip puts an explanation one press away: the help behind a field label, a setting or a column header. The ⓘ button opens a bubble on click, tap or Enter, and the bubble can hold links and buttons, which a c2-tooltip cannot. It is help for everyone, so unlike c2-hover-card it opens on a press, works on touch, and its content is a live region that a screen reader announces when it opens, without moving focus. Tab from the button continues into any link in the bubble.
Pressing the button again, Escape (which puts focus back on the button), a press outside and focus moving elsewhere close it. The button’s name is the label attribute, or the translatable “More information”; give each toggletip a label that says what it explains when a page has several. To use words instead of the icon (“What’s this?”), put them in the icon slot, and they become the button’s name.
Use c2-tooltip for a short name of an icon button, c2-hover-card for a preview behind a link, and c2-popconfirm for an “Are you sure?” question.
Import
import '@c2n/components/toggletip'Usage
Your EU VAT number, starting with the two-letter country code, e.g. FR40303265045.
Where to find itYour EU VAT number, starting with the two-letter country code, e.g. FR40303265045.
Where to find itClick a button, or Tab to it and press Enter. In the first row, Tab once more to reach the link inside the bubble.