<tap-card>
An expandable card. Tap it to expand to full screen, pull down at the top to close.
The expandable slot is only rendered when expanded,
and the first element in the default slot is treated as the card header during expansion.
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 |
