This component is in Beta. Gallery Cards are used to hold specific types of content. They have been used to preview content on the dashboard such as highlight reels and insights.
A charm used to make objects fly, or levitate. It was taught to first-years at Hogwarts School of Witchcraft and Wizardry.
Hermione Granger
Updated March 22,2022
A spell to open locks; aka "the thief's friend.
Hermione Granger
Updated March 22,2022
A charm that illuminated the tip of the caster's wand, allowing the caster to see in the dark. The counter-charm for the spell was the Wand-Extinguishing Charm (Nox), which was used to extinguish the light from the caster's wand.
Hermione Granger
Updated March 22,2022
<div class="l-grid l-col-3 l-md-col-2 l-sm-col-1 l-gap-2x">
<tk-gallery-card selectable>
<tk-gallery-card-content-type class="l-flex l-v-center">
<tk-badge icon type="light">
<tk-icon name="bolt"></tk-icon>
The most basic magic ever known
</tk-badge>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<button type="button" class="btn--icon-only" aria-label="Share Wingardium Leviosa">
<tk-icon name="share"></tk-icon>
</button>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
<tk-gallery-card-body>
<tk-poster-play
class="mb-3x"
poster-image-url="https://cdn3.vectorstock.com/i/1000x1000/77/77/unique-and-colorful-graphic-of-video-thumbnail-vector-40327777.jpg"
>
<span class="ml-2x t-base t-heavy" slot="play-length">8:30</span>
</tk-poster-play>
<tk-gallery-card-title>
<h2 class="t-base t-heavy">Wingardium Leviosa</h2>
</tk-gallery-card-title>
<p class="t-truncate-2x">A charm used to make objects fly, or levitate. It was taught to first-years at Hogwarts School of Witchcraft and Wizardry.</p>
</tk-gallery-card-body>
<tk-gallery-card-footer>
<tk-gallery-card-metadata>
<p class="mb-0x t-small t-ghost t-heavy">Hermione Granger</p>
<p class="t-ghost">Updated March 22,2022</p>
</tk-gallery-card-metadata>
</tk-gallery-card-footer>
</tk-gallery-card>
<tk-gallery-card>
<tk-gallery-card-content-type>
<tk-badge icon type="light">
<tk-icon name="bolt"></tk-icon>
Basic magic
</tk-badge>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<button type="button" class="btn--icon-only" aria-label="Share Alohomora">
<tk-icon name="share"></tk-icon>
</button>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
<tk-gallery-card-body>
<tk-poster-play
class="mb-3x"
poster-image-url="https://cdn3.vectorstock.com/i/1000x1000/16/72/unique-and-colorful-video-thumbnail-design-vector-39131672.jpg"
>
<span class="ml-2x t-base t-heavy" slot="play-length">7:29</span>
</tk-poster-play>
<tk-gallery-card-title>
<h2 class="t-base t-heavy">Alohomora</h2>
</tk-gallery-card-title>
<p class="t-truncate-2x">A spell to open locks; aka "the thief's friend.</p>
</tk-gallery-card-body>
<tk-gallery-card-footer>
<tk-gallery-card-metadata>
<p class="mb-0x t-small t-ghost t-heavy">Hermione Granger</p>
<p class="t-ghost">Updated March 22,2022</p>
</tk-gallery-card-metadata>
</tk-gallery-card-footer>
</tk-gallery-card>
<tk-gallery-card>
<tk-gallery-card-content-type>
<tk-badge icon type="light">
<tk-icon name="bolt"></tk-icon>
The best magic ever
</tk-badge>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<button type="button" class="btn--icon-only" aria-label="Share Lumos">
<tk-icon name="share"></tk-icon>
</button>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
<tk-gallery-card-body>
<tk-poster-play
class="mb-3x"
poster-image-url="https://cdn3.vectorstock.com/i/1000x1000/16/72/unique-and-colorful-video-thumbnail-design-vector-39131672.jpg"
>
<span class="ml-2x t-base t-heavy" slot="play-length">7:29</span>
</tk-poster-play>
<tk-gallery-card-title>
<h2 class="t-base t-heavy">Lumos</h2>
</tk-gallery-card-title>
<p class="t-truncate-2x">A charm that illuminated the tip of the caster's wand, allowing the caster to see in the dark. The counter-charm for the spell was the Wand-Extinguishing Charm (Nox), which was used to extinguish the light from the caster's wand.</p>
</tk-gallery-card-body>
<tk-gallery-card-footer>
<tk-gallery-card-metadata>
<p class="mb-0x t-small t-ghost t-heavy">Hermione Granger</p>
<p class="t-ghost">Updated March 22,2022</p>
</tk-gallery-card-metadata>
</tk-gallery-card-footer>
</tk-gallery-card>
</div>
Our Gallery Card component holds a preview of the content and is usually displayed in a grid with other Gallery Cards. The parent container dictates the width of the card. The tk-poster-play
component is used within gallery card, you can learn more about it here.
A charm used to make objects fly, or levitate. It was taught to first-years at Hogwarts School of Witchcraft and Wizardry.
Hermione Granger
Updated March 22,2022
A spell to open locks; aka "the thief's friend.
Hermione Granger
Updated March 22,2022
A charm that illuminated the tip of the caster's wand, allowing the caster to see in the dark. The counter-charm for the spell was the Wand-Extinguishing Charm (Nox), which was used to extinguish the light from the caster's wand.
Hermione Granger
Updated March 22,2022
<div class="l-grid l-col-3 l-md-col-2 l-sm-col-1 l-gap-2x">
<tk-gallery-card>
<tk-gallery-card-content-type class="l-flex l-v-center">
<tk-badge icon type="light">
<tk-icon name="bolt"></tk-icon>
The most basic magic ever known
</tk-badge>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<button type="button" class="btn--icon-only" aria-label="Share Wingardium Leviosa">
<tk-icon name="share"></tk-icon>
</button>
<button type="button" class="btn--icon-only" aria-label="Share Wingardium Leviosa">
<tk-icon name="email"></tk-icon>
</button>
</tk-gallery-card-actions>
<tk-gallery-card-body>
<tk-poster-play
ratio="wide"
class="mb-3x"
poster-image-url="https://cdn3.vectorstock.com/i/1000x1000/77/77/unique-and-colorful-graphic-of-video-thumbnail-vector-40327777.jpg"
>
<span class="ml-2x t-base t-heavy" slot="play-length">8:30</span>
</tk-poster-play>
<tk-gallery-card-title>
<h2 class="t-base t-heavy">Wingardium Leviosa</h2>
</tk-gallery-card-title>
<p class="t-truncate-2x">A charm used to make objects fly, or levitate. It was taught to first-years at Hogwarts School of Witchcraft and Wizardry.</p>
</tk-gallery-card-body>
<tk-gallery-card-footer>
<tk-gallery-card-metadata>
<p class="mb-0x t-small t-ghost t-heavy">Hermione Granger</p>
<p class="t-ghost">Updated March 22,2022</p>
</tk-gallery-card-metadata>
</tk-gallery-card-footer>
</tk-gallery-card>
<tk-gallery-card>
<tk-gallery-card-content-type>
<tk-badge icon type="light">
<tk-icon name="bolt"></tk-icon>
Basic magic
</tk-badge>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<button type="button" class="btn--icon-only" aria-label="Share Alohomora">
<tk-icon name="share"></tk-icon>
</button>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
<tk-gallery-card-body>
<tk-poster-play
ratio="wide"
class="mb-3x"
poster-image-url="https://cdn3.vectorstock.com/i/1000x1000/16/72/unique-and-colorful-video-thumbnail-design-vector-39131672.jpg"
>
<span class="ml-2x t-base t-heavy" slot="play-length">7:29</span>
</tk-poster-play>
<tk-gallery-card-title>
<h2 class="t-base t-heavy">Alohomora</h2>
</tk-gallery-card-title>
<p class="t-truncate-2x">A spell to open locks; aka "the thief's friend.</p>
</tk-gallery-card-body>
<tk-gallery-card-footer>
<tk-gallery-card-metadata>
<p class="mb-0x t-small t-ghost t-heavy">Hermione Granger</p>
<p class="t-ghost">Updated March 22,2022</p>
</tk-gallery-card-metadata>
</tk-gallery-card-footer>
</tk-gallery-card>
<tk-gallery-card>
<tk-gallery-card-content-type>
<tk-badge icon type="light">
<tk-icon name="bolt"></tk-icon>
The best magic ever
</tk-badge>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<button type="button" class="btn--icon-only" aria-label="Share Lumos">
<tk-icon name="share"></tk-icon>
</button>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
<tk-gallery-card-body>
<tk-poster-play
ratio="wide"
class="mb-3x"
poster-image-url="https://cdn3.vectorstock.com/i/1000x1000/16/72/unique-and-colorful-video-thumbnail-design-vector-39131672.jpg"
>
<span class="ml-2x t-base t-heavy" slot="play-length">7:29</span>
</tk-poster-play>
<tk-gallery-card-title>
<h2 class="t-base t-heavy">Lumos</h2>
</tk-gallery-card-title>
<p class="t-truncate-2x">A charm that illuminated the tip of the caster's wand, allowing the caster to see in the dark. The counter-charm for the spell was the Wand-Extinguishing Charm (Nox), which was used to extinguish the light from the caster's wand.</p>
</tk-gallery-card-body>
<tk-gallery-card-footer>
<tk-gallery-card-metadata>
<p class="mb-0x t-small t-ghost t-heavy">Hermione Granger</p>
<p class="t-ghost">Updated March 22,2022</p>
</tk-gallery-card-metadata>
</tk-gallery-card-footer>
</tk-gallery-card>
</div>
Passing a ratio="wide"
prop to the tk-poster-play
component renders the thumbnail on the card in a 16:9 ratio.
<div class="l-grid l-col-3 l-md-col-2 l-sm-col-1 l-gap-2x">
<tk-gallery-card minimal>
<tk-gallery-card-content-type class="l-flex l-v-center">
<tk-icon name="folder"></tk-icon>
<span class="t-heavy t-small ml-2x">Astronomy</span>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
</tk-gallery-card>
<tk-gallery-card minimal selectable>
<tk-gallery-card-icon>
<tk-icon name="folder"></tk-icon>
</tk-gallery-card-icon>
<tk-gallery-card-content-type>
<span class="t-heavy t-small ml-2x">Care of Magical Creatures</span>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
</tk-gallery-card>
<tk-gallery-card minimal selectable>
<tk-gallery-card-icon>
<tk-icon name="folder"></tk-icon>
</tk-gallery-card-icon>
<tk-gallery-card-content-type>
<span class="t-heavy t-small ml-2x">Charms</span>
</tk-gallery-card-content-type>
<tk-gallery-card-actions>
<tk-dropdown trigger-type="action" button-label="See Howler options">
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Send a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Recieve a Howler
</button>
</tk-dropdown-item>
<tk-dropdown-item>
<button class="dropdown__link" type="button">
Delete a Howler
</button>
</tk-dropdown-item>
</tk-dropdown>
</tk-gallery-card-actions>
</tk-gallery-card>
</div>
The Gallery Card component can be used in minimal
mode. This mode is intended for showing basic data only, usually an icon, a title, an action and a short description. If a Gallery Card in minimal
mode is also selectable
, the checkbox appears where the icon used to be when you hover over a card.
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
minimal |
minimal |
Boolean flag indicating whether a card should be rendered in minimal mode | boolean |
false |
selectable |
selectable |
Boolean flag indicating whether a card should be rendered with a checkbox to be able to select it | boolean |
false |
selected |
selected |
State indicator of whether a card is currently selected | boolean |
false |
Event | Description | Type |
---|---|---|
cardSelect |
Fires when a card is selected by clicking its checkbox | CustomEvent<boolean> |
Slot | Description |
---|---|
"actions" |
Actions that the user can take with the selected items. It should always be on the far right side. If using our tk-dropdown , the dropdown should have a position of top-right . |
"body" |
Displays a title and description of the card content |
"content-type" |
Displays the content type of the card content |
"footer" |
Shows tertiary information like created date, created by, etc. |
"title" |
Displays the title of the card content |
tk-gallery-card-content-type
sub-component for our badge or badge-like contentminimal
mode, reserve the use of tk-gallery-card-content-type
sub-component for an icon (like tk-icon
)tk-gallery-card-actions
tk-gallery-card-actions
if using the Gallery Card in minimal
mode
sub-component