Skip to content

GenerativeFormFill

stablev1.0.0

Form field with AI-assist affordances: ghost-text suggestion, accept/reject controls, Tab-to-accept keyboard shortcut, provenance badge (model name + confidence), and generating state. WCAG AA compliant with full ARIA labeling.

ai-agentInteractive/Storybook ↗
import { GenerativeFormFill } from "@danagraph/design-system"
Loading demo…

Props

value
Type stringDefault —

Current confirmed value.

suggestion
Type stringDefault —

AI-generated suggestion text (shown as ghost text).

model
Type stringDefault —

Which model generated the suggestion.

generating
Type booleanDefault false

Loading state: AI is generating a suggestion.

confidence
Type numberDefault —

Confidence score 0–1 shown in the provenance badge.

label
Type stringDefault —

Field label.

placeholder
Type stringDefault —

Placeholder text when empty and no suggestion.

type
Type "text" | "email" | "number" | "search" | "url"Default "text"

HTML input type.

onAccept
Type (value: string) => voidDefault —

Called when user accepts the suggestion.

onReject
Type () => voidDefault —

Called when user rejects the suggestion.

onChange
Type (value: string) => voidDefault —

Called when user edits the field.

disabled
Type booleanDefault false

Disable the field.

required
Type booleanDefault false

Mark field as required.

error
Type stringDefault —

Error message displayed below the field.

semantictypebordersurface
Design Rationale

This component was designed to express:

Explore Related

Was this helpful?