Bubble
Importimport{ Bubble }from"@ant-design/x"; |
Sourcecomponents/bubble |
Often used when chatting.
Common props ref:Common props
Property | Description | Type | Default | Version |
---|---|---|---|---|
avatar | Avatar component | React.ReactNode | - | |
classNames | Semantic DOM class | Record<SemanticDOM, string> | - | |
content | Content of bubble | string | - | |
footer | Footer content | React.ReactNode | - | |
header | Header content | React.ReactNode | - | |
loading | Loading state of Message | boolean | - | |
placement | Direction of Message | start | end | start | |
shape | Shape of bubble | round | corner | - | |
styles | Semantic DOM style | Record<SemanticDOM, CSSProperties> | - | |
typing | Show message with typing motion | boolean | { step?: number, interval?: number } | false | |
variant | Style variant | filled | borderless | outlined | shadow | filled | |
loadingRender | Customize loading content | () => ReactNode | - | |
messageRender | Customize display content | (content?: string) => ReactNode | - | |
onTypingComplete | Callback when typing effect is completed. If typing is not set, it will be triggered immediately when rendering. | () => void | - |
Property | Description | Type | Default | Version |
---|---|---|---|---|
autoScroll | When the content is updated, scroll to the latest position automatically. If the user scrolls, the automatic scrolling will be paused. | boolean | true | |
items | Bubble items list | (BubbleProps & { key?: string | number, role?: string })[] | - | |
roles | Set the default properties of the bubble. The role in items will be automatically matched. | Record<string, BubbleProps> | (bubble) => BubbleProps | - |
How to rest effectively after long hours of work?
What are the secrets to maintaining a positive mindset?
How to stay calm under immense pressure?
How to rest effectively after long hours of work?
What are the secrets to maintaining a positive mindset?
How to stay calm under immense pressure?