Skip to main content

CollapsibleSettingsCard

Function CollapsibleSettingsCard 

Source
pub fn CollapsibleSettingsCard(_: CollapsibleSettingsCardProps) -> Element
Expand description

可折叠卡片外壳,默认使用后台设置样式,前台可通过 class 定制外观。

复用回收站与系统设置的同一套交互:状态指示灯、摘要标题、旋转箭头,以及 grid-template-rows 的 0fr↔1fr 平滑展开。调用方通过 children 提供面板内容, 通过 on_toggle 在展开状态变化时清理本地反馈等附加状态。

Props:

  • title:卡片标题
  • summary:标题下的当前状态摘要
  • enabled:状态指示灯是否使用主题色
  • children:折叠面板内容(调用方负责内容内边距与分隔线)
  • on_toggle:可选的展开/收起回调
  • default_open:首次挂载时是否展开
  • class / panel_id:可选的外观类名与面板 ID(连接 aria-controls)

§Props

For details, see the props struct definition.