caliper uidocs

Support widget

Pro

A floating help button that opens a chat.

Installs components/ui/support-widget.tsxDepends on @radix-ui/react-slot, lucide-reactMotion none in component source
pnpm dlx shadcn@latest add @caliper/support-widget

Your product page. The help button sits in the corner.

When to use #

Use it for

  • Offering help on every page.

Skip it when

  • The page already has a help panel.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/support-widget

Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { SupportWidget } from "@/components/ui/support-widget"

The worked example comes with Pro

The 30-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

SupportWidget

component
PropTypeDefaultDescription
articles *readonly HelpArticle[]—
onAsk *(question: string) => Promise<string>—Answer a question. Resolve with the reply text.
onContact *(email: string, message: string) => Promise<void>—
onlinebooleantrue
unreadnumber0
classNamestring—

Accessibility #

It exposes dialog, tablist, tab, tabpanel, log and status semantics, with aria-label, aria-hidden, aria-selected, aria-controls, aria-labelledby and aria-live kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
EscapeCloses or cancels, then returns focus to where it came from.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.