Border Tooltip
Install the component, then paste your configured usage. Your settings are included in the code below.
npx arclen-ui add border-tooltip --settings eyJsYWJlbHMiOlsiQ2x1ZXMiLCJOb3RlcyIsIklkZWFzIl0sInRoZW1lIjoiZGFyayIsInBsYWNlbWVudCI6InRvcCIsInNjYWxlIjoxLCJnYXAiOjEyLCJkdXJhdGlvbiI6NDAwLCJhY2NlbnQiOiIjN2Q4YWZmIn0import { BorderTooltip } from "@/components/border-tooltip";
export default function Example() {
return <BorderTooltip {...{
"labels": [
"Clues",
"Notes",
"Ideas"
],
"theme": "dark",
"placement": "top",
"scale": 1,
"gap": 12,
"duration": 400,
"accent": "#7d8aff"
}} />;
}| Property | Type | Default |
|---|---|---|
labelsTooltip descriptions Minimum 3 itemsMaximum 3 itemsUp to 180 characters per item | string-list | ["Clues","Notes","Ideas"] |
themeTheme Options: auto, light, dark | select | "auto" |
placementPreferred placement Options: top, bottom | select | "top" |
scaleScale 0.75–1.5Step 0.05 | number | 1 |
gapPointer distance 8–24Step 1 | number | 12 |
durationMotion duration 0–700Step 10 | number | 400 |
accentFocus accent | color | "#7d8aff" |
Border Tooltip
Three information buttons with fine outlined descriptive labels. All three buttons stay equal in size; the third label uses double scale. Hover, focus or tap to read; Escape dismisses. Labels contain text only.
React
Keep the complete component folder, including its assets. React 19 is a peer supplied by your application.
import { BorderTooltip } from './components/border-tooltip/src/react';
export default function Example() {
return <BorderTooltip theme="dark"
labels={['Made for focus', 'Details stay close', 'A little more room']}
placement="top" duration={400} />;
}The wrapper loads the component stylesheet. className and style apply to the outer host. Set paused to suspend the floating descriptions without removing the triggers.
HTML and vanilla
Include the complete generated HTML bundle and its local assets. Load component.css, paste component.html, and retain component.js. Use relative paths when deploying under a subdirectory.
For direct core use in a bundler:
import { mount } from './components/border-tooltip/src/core';
import './components/border-tooltip/src/styles.css';
const tooltip = mount(document.querySelector<HTMLElement>('#tooltip')!, {
labels: ['Made for focus', 'Details stay close', 'A little more room'],
placement: 'top', theme: 'light'
});
tooltip.update({ placement: 'bottom', duration: 250 });
tooltip.pause();
tooltip.resume();
tooltip.destroy();update accepts a complete or partial configuration resolved against defaults, not the previous configuration. Invalid input throws before changing the active component. Labels require three nonempty strings, each at most 180 characters. No-JavaScript rendered markup leaves descriptions visible beside their buttons.
Behavior
Tab focuses each information button and opens its description. Enter, Space or tap toggles a pinned description. Escape or an outside press dismisses it. Focus keeps a label open during pointer departure. Pointer travel stays inside the region joining the trigger and label; departure elsewhere starts exit immediately. The persistent accessible description remains linked even while the floating visual is hidden.
Placement offers Top and Bottom. It prefers the selected side and flips to the other vertical side when needed. It reserves 20 pixels around the visual viewport where space permits. Long labels wrap. Overlays attach to the document body to avoid clipping by ordinary transformed or scrolling component ancestors. Avoid applying transforms to the document body or root element.
Reduced motion removes translation and scaling, retaining a short opacity change. Offscreen or hidden-document descriptions hide. Pause hides immediately and stops transitions; resume restores the current interaction state. Destroy removes owned overlays, observers and listeners, then restores the host's original HTML. Multiple mounts are independent.
Settings
The manifest defines the complete settings reference. Theme can follow the system or be explicit. Scale ranges from 0.75 to 1.5; pointer distance from 8 to 24 pixels; duration from 0 to 700 milliseconds. Accent controls the keyboard focus outline.
Version 2
The outlined design is now the only design. Remove the former direction prop when upgrading. Placement accepts top or bottom; replace previous left or right values with a vertical placement.
The preview runs the component’s own JavaScript. It respects reduced motion and pauses when off screen. The HTML bundle includes a static fallback.
Every setting in this panel comes from the component manifest. Preview size, pause and replay stay in the inspector.