Experimental: The AI extension and its component APIs may change in the future. Please give us feedback on your experience with them.
Import#
import { Sources } from '@dnb/eufemia/extensions/ai'import '@dnb/eufemia/extensions/ai/style'render(<Sources />)
Description#
Ai.Sources shows a collapsible list of sources. Pass sources as an array of { url, title } objects. Put it inside Ai.Message where the sources should appear. URLs are checked before links are rendered.
Demos#
Sources#
<Message name="Aino" aiGenerated> <Response> {'You can block your card in the app under **Cards**.'} </Response> </Message> <Sources top="x-small" sources={[ { url: 'https://www.dnb.no/kort', title: 'Cards', }, { url: 'https://www.dnb.no/hjelp', title: 'Help and contact', }, ]} />