logoAnt Design X

DesignDevelopmentComponentsX MarkdownX SDKPlayground
  • Introduction
  • Overview
  • Common
    • Bubble
    • Conversations
    • Notification
  • Confirmation
    • Sources
    • Think
    • ThoughtChain
  • Wake
    • Welcome
    • Prompts
  • Express
    • Attachments
    • Sender
    • Suggestion
  • Feedback
    • Actions
    • FileCard
  • Others
    • XProvider

Sources

Show the source address of the referenced data.
Importimport { Sources } from "@ant-design/x";
Sourcecomponents/sources
Docs
Edit this page
loading

When To Use

Show the referenced data source address in online search mode.

Examples

API

Common props ref:Common props

SourcesProps

PropertyDescriptionTypeDefaultVersion
classNamesDOM classRecord<SemanticDOM, string>--
stylesDOM styleRecord<SemanticDOM, CSSProperties>--
titleTitle contentReact.ReactNode--
itemsSources Content listSourcesItem[]--
expandIconPositionIcon position'start' | 'end''start'-
defaultExpandedDefault Expand statebooleantrue-
expandedExpand stateboolean--
onExpandCallback when expand changes(expand: boolean) => void--
onClickCallback when click(item: SourcesItem) => void--
inlineInline modebooleanfalse-
popoverOverlayWidthpopover overlay widthnumber | string300-
typescript
interface SourcesItem {
key?: React.Key;
title: React.ReactNode;
url?: string;
icon?: React.ReactNode;
description?: React.ReactNode;
}

Semantic DOM

Design Token

Global TokenHow to use?
Basic

Basic usage.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Icon

Show icon.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Expand

Control expand and collapse state.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Inline

Show source information on hover.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Used 3 sources
  • 1. Data source
  • 2. Data source
  • 3. Data source
Used 3 sources
  • Data source from twitter
  • Data source from youtube
  • Data source from github

Used 3 sources
  • 1. Data source
  • 2. Data source
  • 3. Data source
Use the inline mode in the text
1
Used 3 sources
  • 1. Data source
  • 2. Data source
  • 3. Data source
  • root
    Root
  • title
    Title
  • content
    Content