Skip to content

@sqlrooms/ai-core / PromptSuggestions

Variable: PromptSuggestions

const PromptSuggestions: object

Composable PromptSuggestions component with Container, Item, and VisibilityToggle subcomponents

Type Declaration

NameTypeDescription
ContainerFC<PromptSuggestionsContainerProps>Container component for prompt suggestions Shows suggestions when visible, returns null when not visible
ItemFC<PromptSuggestionsItemProps>Individual prompt suggestion item component Displays a single prompt suggestion and handles click events
VisibilityToggleFC<PromptSuggestionsVisibilityToggleProps>Toggle button for showing/hiding prompt suggestions Can be placed anywhere in the UI Always shows a Lightbulb icon with styling that changes based on state

Example

tsx
<PromptSuggestions.Container isLoading={false}>
  <PromptSuggestions.Item text="What are the top selling products?" />
  <PromptSuggestions.Item text="Show me the revenue trends" />
</PromptSuggestions.Container>

<PromptSuggestions.VisibilityToggle />