Video Grid
Lays out the tiles of a call as a grid, a spotlight or a sidebar, every tile as large as the space allows.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
layout | VideoGridLayout | grid | grid, spotlight or sidebar. |
max-tiles | number | 0 | The most tiles drawn; the rest fold into a "+N more" tile. 0 draws them all. |
Slots
| Name | Description |
|---|---|
(default) | The tiles, usually c2-video-tile elements. |
Events
| Name | Type | Description |
|---|---|---|
featured-change | CustomEvent<{ tile: Element | null }> | Fired when the featured tile changes. Does not bubble. |
overflow-click | CustomEvent<{ hidden: Element[] }> | Fired when the "+N more" tile is pressed. Does not bubble. |
CSS parts
Shadow DOM styling hooks used with ::part(name). Prefer CSS custom properties when they cover the change.
| Name | Description |
|---|---|
stage | The area of the grid, or of the featured tile. |
strip | The filmstrip or sidebar. |
more | The "+N more" tile. |
CSS custom properties
Grouped by semantic target and state from --c2-<component>__<target>__<state>--<property>. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-video-grid--height | pixel | auto | The height the tiles are fitted to; 100% fills a sized parent. While auto, the grid takes --c2-video-grid--aspect-ratio from its width. |
--c2-video-grid--aspect-ratio | number | 16 / 9 | The grid's own shape while its height is auto. |
--c2-video-grid--gap | pixel | 8px | |
--c2-video-grid--padding | pixel | 8px | |
--c2-video-grid--background | color | transparent | |
--c2-video-grid__tile--aspect-ratio | number | 16 / 9 | The shape of the tiles the grid fits. |
--c2-video-grid__strip--size | pixel | 112px | Height of the filmstrip, or width of the sidebar. |
--c2-video-grid__more--background | color | light-dark(#e4e4e7, #27272a) | |
--c2-video-grid__more--color | color | light-dark(#18181b, #fafafa) | |
--c2-video-grid__more--border-radius | border-radius | 8px | |
--c2-video-grid__more__focus--outline | outline | 2px solid rgba(2, 101, 220, 0.4) | |
Text and languages
The text the component shows, in English. It shows another language when the app adds one with addTranslations, under video-grid, and the nearest lang asks for it; any message not translated stays in English. {0}, {1}… stand for the values a message carries. Languages guide.
| Key | English | Values |
|---|---|---|
participants | Participants ({0}) | {0} count |
more | +{0} more | {0} count |
showMore | Show {0} more participants | {0} count |