Skip to content
caliper ui pro docs

Ask your data

Ask a question of your own data in plain words. The steps of the work show as they happen, the answer arrives as a sentence over ranked rows with bars, and the query behind it opens on request, so the number can be checked.

Pro

When to use

  • Analytics, finance and operations tools where people ask ad hoc questions of their tables.
  • Admin screens that would otherwise need a report built for every question.

When not to use

  • Fixed metrics people check daily; put them on a dashboard.
  • Results with many columns; open them in a data table.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/ask-your-data

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.

API reference

AskYourData

6 props
PropTypeDefaultDescription
onAsk *(question: string, signal: AbortSignal, report: (step: number) => void) => Promise<DataAnswer>—Answers the question. Call `report(i)` as each step starts; abort when the signal fires; throw to show an error.
suggestionsreadonly string[][]
stepsreadonly string[]defaultStepsNames of the steps the host reports through `report`.
placeholderstring"Ask a question about your data"
labelstring"Ask your data"
classNamestring—

Keyboard

Escape
Closes or cancels, then returns focus to where it came from.

Accessibility

It exposes group, alert and status semantics, with aria-label, aria-busy, aria-hidden, aria-expanded and aria-controls kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/ask-your-data.md

The index of every part is at /llms.txt.

More in Assistant screens