PromptForm
API reference and demos for PromptForm.
Import
Section titled “Import”import { PromptForm } from "@flanksource/clicky-ui/data";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
basePath* |
string |
— | Base path the prompt API is mounted under, e.g. "/api/todos". |
frame |
(…) => … |
— | Lays out the form and its Submit/Cancel actions. PromptDialog pins the actions in its Modal footer; without a frame the prompt's title and description head the form and the actions sit below it. |
idPrefix |
string |
— | Prefix for the form's field ids; give each copy of the same prompt on a page its own. Defaults to `prompt-<id>`. |
lookupFetcher |
LookupFetcher |
— | Resolves the options of the schema's `x-clicky-lookup` fields (e.g. a connection picker). |
onResolved |
(…) => … |
— | Called after the prompt is successfully answered or cancelled. |
prompt* |
PromptSnapshot |
— | The pending prompt to answer. Its `schema` drives the rendered form. |