Skip to content

Experimental: The AI extension and its component APIs may change in the future. Please give us feedback on your experience with them.

Import#

import { Suggestion, Suggestions } from '@dnb/eufemia/extensions/ai'
import '@dnb/eufemia/extensions/ai/style'
render(
<Suggestions>
<Suggestion />
</Suggestions>
)

Description#

Use Ai.Suggestions with Ai.Suggestion to show prompts the user can choose, e.g. on a welcome screen. Each suggestion is a default-size secondary button. onClick receives the suggestion, so the shown text can be shorter than the prompt that is sent.

Demos#

Suggestion buttons#

<Suggestions>
  <Suggestion suggestion="Block my Visa card">block my visa</Suggestion>
  <Suggestion suggestion="Show my latest transactions">
    transactions
  </Suggestion>
</Suggestions>
Suggest an edit