Side Panel
停靠在页面旁边的面板,包含标题栏、标题、操作、关闭按钮和可滚动的内容区。
可用框架
Angular: 可用 Vue: 可用 React: 可用 React Native: 暂不可用
用法
Weekly sync — the note stays in place while the panel docks beside it.
<div class="demo-row" style="align-items: stretch; width: 100%; min-height: 280px">
<div class="demo-stack" style="flex: 1">
<p>Weekly sync — the note stays in place while the panel docks beside it.</p>
@if (!open()) {
<button soneBtn variant="outline" type="button" (click)="open.set(true)">Open details</button>
}
</div>
@if (open()) {
<aside soneSidePanel aria-labelledby="side-panel-demo-title">
<header soneSidePanelHeader>
<h2 soneSidePanelTitle id="side-panel-demo-title">Details</h2>
<div soneSidePanelActions>
<sone-side-panel-close label="Close details" (closed)="open.set(false)" />
</div>
</header>
<div soneSidePanelContent>
<p>Created 9 October · 3 participants · 42 minutes.</p>
</div>
</aside>
}
</div>导入
import {
SoneSidePanelActionsDirective,
SoneSidePanelCloseComponent,
SoneSidePanelContentDirective,
SoneSidePanelDirective,
SoneSidePanelHeaderDirective,
SoneSidePanelTitleDirective,
} from "@surface-one/angular/side-panel";API 参考
SoneSidePanelActionsDirective指令
SoneSidePanelCloseComponent组件
| 名称 | 类型 | 默认值 |
|---|---|---|
label必填 | string | — |
| 名称 | 类型 |
|---|---|
closed | void |