Some properties provide flexibility for specific integrations. Follow the component's usage guidance. Customizations beyond the documented patterns need a use case approved by DNB UX. Read about intended use and customization.
Experimental: The AI extension and its component APIs may change in the future. Please give us feedback on your experience with them.
Properties#
| Type | Description | |
|---|---|---|
currencyFormatting | boolean object | (optional) Format recognized currency amounts with NumberFormat.Currency. Prefix amounts followed by a word remain text. Set to false to keep the original text, or provide the source locale and currency for amounts written as kr. Defaults to true, using Provider values. |
children | string | (optional) The markdown to render. Can be updated while the response is streaming. |
parseIncompleteMarkdown | boolean | (optional) Close unfinished markdown (like **bold or an open code span) and hide unfinished links and images in the last block while streaming. |
components | object | (optional) Override how a markdown element is rendered, keyed by its HTML tag name, e.g. { a: MyLink }. Code blocks render code inside pre with a language-* class, and pre receives code and language. |
allowedLinkPrefixes | Array<string> | (optional) URL prefixes allowed for links. Use * to allow any http(s), mailto and tel URL. Links that are not allowed are rendered as text. |
allowedImagePrefixes | Array<string> | (optional) Trusted URL prefixes allowed for images. Images are disabled by default; blocked images render as alt text. |
defaultOrigin | string | (optional) Origin used to resolve relative link and image URLs before they are checked. |
Space | string object | (optional) Spacing properties like top or bottom are supported. |
Translations#
| Key | nb-NO | en-GB | sv-SE | da-DK |
|---|---|---|---|---|
copyCode | Kopier kode | Copy code | Kopiera kod | Kopiér kode |
codeCopied | Kopiert | Copied | Kopierat | Kopieret |