Collapsible Section

可折叠的带标题区块:带箭头、副标题和计数的标题按钮,内容在下方。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 暂不可用

用法

  • Ada Park: share the launch checklist
  • Sam Lee: review the pricing page copy
  • Kai Moreno: book the design review

导入

ts
import {
  SoneCollapsibleSectionActionsDirective,
  SoneCollapsibleSectionComponent,
} from "@surface-one/angular/collapsible-section";

API 参考

SoneCollapsibleSectionActionsDirective指令

`[soneCollapsibleSectionActions]` — controls at the end of the header, outside the toggle button.

选择器
[soneCollapsibleSectionActions]

SoneCollapsibleSectionComponent组件

`<sone-collapsible-section>` — a titled section that folds, built on the Collapsible: a full-width header button (chevron, `title`, optional `subtitle` and a secondary-badge `count`) that keeps `aria-expanded` / `aria-controls` in sync, and the projected body below it. `[(open)]` binds the state. Controls in `[soneCollapsibleSectionActions]` sit at the end of the header, outside the button.

选择器
sone-collapsible-section
导出为
soneCollapsibleSection
输入
名称类型 默认值
title必填

The section's name, shown in the header button.

string—
subtitle

A quiet line after the title (a date range, a source).

string | nullnull
count

A count in a secondary badge after the title; `null` hides it.

number | string | nullnull
open双向

Whether the body is shown (`[(open)]`).

booleanfalse
disabledbooleanfalse