2.10.0
中文
Skip to content

Sources ​

Data source references used to display AI response content.

Examples ​

Basic usage ​

Basic usage

Basic usage.

Show icon ​

Show icon

Show an icon and choose expand-icon placement.

Control expand/collapse ​

Control expand/collapse

Control expand/collapse.

Inline mode ​

Use the inline mode in the text
1
Use the inline mode in the text
2
Inline mode

Show source info on hover.

API ​

SourcesProps ​

PropDescriptionTypeDefaultVersion
prefixClsStyle class name prefixstring--
titleTitle`VNodestring`-
itemsData source listSourcesItem[]--
inlineWhether to use inline modebooleanfalse-
expandedWhether to Expand (Controlled)boolean--
defaultExpandedDefault Expandbooleantrue-
onExpandExpand/Fold Pullback(expand: boolean) => void--
expandIconPositionExpand icon position'start' | 'end''start'-
activeKeyKey of the current active item (inline mode)string | number--
onClickClick Data Source Item to Pullback(item: SourcesItem) => void--
popoverOverlayWidthPopover Floating Card Widthnumber | string300-
classNamesSemantics classRecord\<SemanticType, string\>--
stylesSemanticization styleRecord\<SemanticType, CSSProperties\>--
rootClassNameRoot class namestring--

SourcesItem ​

PropDescriptionTypeDefaultVersion
keyUnique Identifierstring | number--
titleTitle`VNodestring`-
urlLink Addressstring--
iconIconVNode--
descriptionDescription (displayed in inline mode)VNode | string--

Sources Slots ​

SlotDescription
defaultCustom content (used when items are not passed)

Sources Ref ​

PropDescriptionType
nativeElementComponent Root DOM ElementHTMLDivElement

SemanticType ​

root | title | content

Semantic DOM ​

  • root
    来源组件的根容器
  • title
    标题区域容器
  • content
    来源内容区域容器

Design Token ​

This component has no custom Component Token. Customize it through global Design Tokens.