<tap-card>
可展开的卡片,点击展开到全屏,在顶部下拉关闭。
expandable 插槽只在展开后渲染,
默认插槽中的第一个元素在展开时作为卡片头部。
Example
Loading...
<tap-card style=${"width: 300px;"}> <div style='padding: 1em; height: 120px; background: #6366f1; color: white'><h3>Build for touch</h3><p>Tap to expand</p></div><tap-content slot='expandable'><p>Detail content, pull down at the top to close.</p></tap-content> </tap-card>
API
The first element in the default slot is treated as the card header during expansion. Its top padding, height, and min-height are animated to include the top safe area in fullscreen mode.
Shadow DOM; Extends GemElement
Other
| Type | Value |
|---|---|
| Slot | unnamed, expandable |
| Part | card, close |
| CSS State | expand, press |
