Skip to main content

TagChip

Function TagChip 

Source
pub fn TagChip(_: TagChipProps) -> Element
Expand description

标签芯片组件:统一的标签可视化(标签云软底 / 卡片描边两种变体)。

收敛原本散落在标签云(tags.rs 软底圆角)与文章卡片(post_card.rs 描边胶囊) 的两套手写 Link 样式——两者都是跳转到 Route::TagDetail 的可点击标签, 仅视觉变体不同,故合并为一个组件 + variant prop。

Props:

  • label:标签名
  • variant"solid"(标签云:软底圆角,可选计数)/ "outline"(卡片内:描边胶囊)
  • count:可选的文章计数(仅 solid 渲染为 <sup>
  • stop_propagation:是否阻止点击冒泡(卡片内覆盖层链接场景需要,见 PostCard

§Props

For details, see the props struct definition.