Groups¶
A group keeps several card items together as one visual arrangement. The items keep their positions relative to the group, while moving the group moves the complete arrangement at once.
This page shows how to create a group, position items inside it, repeat the same arrangement elsewhere, and show or hide the complete group together.
Put related items in a group¶
This example keeps an icon, name, and state together:
xpos or ypos moves all three items together. Position items inside the group¶
The center of a group is 50, 50.
- Values below
50move an item left or up. - Values above
50move an item right or down. 50, 50keeps the item at the group center.
The group itself uses the normal card coordinates.
Put a group inside another group¶
Set parent when one group should be positioned relative to another group. The child group also uses 50, 50 as its no-offset position.
A parent must name an existing group. Groups cannot form a circular parent chain.
Scale a group¶
Set scale to resize items that use the group. A single number scales both directions; an x/y mapping lets you scale horizontally and vertically by different amounts.
Omit scale to leave the grouped items at their normal size.
Repeat the same arrangement elsewhere¶
Create another group and reuse the items when the same arrangement should appear somewhere else:
Adjust colors for a complete group¶
Set color_filter on the group when all items in that group should receive the same color adjustment. Items can still add their own filter settings.
See Color filters for the available filter fields.
Show or hide a complete group¶
Apply visibility to the group when a complete part of the card should appear or disappear together:
Configuration options¶
Required applies to the specific form described by that table: Yes means you need the field for that form; No means you can leave it out. Not set means the card adds no explicit value when the option is omitted.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | No | List position as text | Name used by group, parent, and same_as. If omitted, the card uses the group's zero-based position in layout.groups as a text ID: "0", "1", "2", and so on. |
parent | string | No | Card root | Positions this group relative to the named parent group. |
xpos | number | Yes | — | Horizontal position of the complete group. For a child group, 50 means no horizontal offset from its parent. |
ypos | number | Yes | — | Vertical position of the complete group. For a child group, 50 means no vertical offset from its parent. |
scale | number or {x, y} | No | 1 | Scales items that use this group. A number scales both directions; x and y set them separately. |
visibility | visible, hidden, or template | No | visible | visible renders the group and its contents; hidden hides the group and items below it in the parent chain. A template can return either value dynamically. |
color_filter | mapping | No | Not set | Applies the configured color adjustments to items in this group. Parent-group filters are applied before child-group and item filters. |
same_as | string | No | Not set | Starts this group from an earlier group in layout.groups. |
same_as_replace | list of paths | No | Not set | Replaces selected inherited fields instead of combining them with the reused group. |