Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
React Native docs
AIReact Native

Prompt suggestions

Offer starter prompts for an empty conversation.

Public APILumenPromptSuggestionsReact Native

Native example

Use Prompt suggestions

Fill your composer with the chosen value so people can edit before sending.

Prompt suggestions rendered in the Expo web renderer Lumen playground

Captured exampleExpo web renderer

Open interactive preview
Open the Prompt suggestions demo
tsx
import { useState } from 'react'
import { LumenPromptComposer, LumenPromptSuggestions } from '@santi020k/lumen-react-native'
import { View } from 'react-native'

export function EmptyChat({ onSend }: { onSend: (prompt: string) => void }) {
  const [value, setValue] = useState('')

  return (
    <View style={{ gap: 16 }}>
      <LumenPromptSuggestions
        onSuggestionSelect={setValue}
        suggestions={[
          { label: 'Summarize this thread' },
          { label: 'Draft a reply', value: 'Draft a friendly reply that confirms Thursday' }
        ]}
      />
      <LumenPromptComposer onSubmit={onSend} onValueChange={setValue} value={value} />
    </View>
  )
}
React Native
Starter prompts that fill the host's composer when chosen.

Reference

Public API

The primary shared and platform-specific options exposed by LumenPromptSuggestions.

APIValues or typeDefaultDescription
suggestions / label / disabledlabel and optional value / group name / disable allrequired / Suggested prompts / falseFill your composer with the chosen value so people can edit before sending.

Native behavior

Design and accessibility

When to use it

Fill your composer with the chosen value so people can edit before sending.

Accessibility

Named group of buttons; renders nothing without suggestions.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose Web
React Native docsNative primitives