Skip to content

Twitter 嵌入 TwitterEmbed

TwitterEmbed 允许你轻松地将单条推文或推文列表集成到你的页面中,非常适合收集用户证言或行业动态。

社区声音

import { TwitterEmbed } from '@goenhance/cms-ui';
const Example = () => (
<TwitterEmbed
title="推文展示"
list={[
{ tweetId: "...", description: "..." }
]}
/>
);
属性类型默认值说明
titlestring-区域标题
listTwitterEmbedItem[][]推文数据列表
属性类型说明
tweetIdstring推文 ID
tweetUrlstring推文链接 (用于占位符)
descriptionstring推文描述 (用于加载时的占位显示)
  • 多列瀑布流:在大屏幕下自动以多列布局展示推文,节约纵向空间。
  • 渐进增强:加载过程中显示美观的链接占位符,增强用户体验。
  • 原生渲染:直接调用 Twitter 官方嵌入脚本,保持样式原汁原味。