Skip to content

feat: add icon-top and icon-bottom label positions#2721

Open
jeffmoss wants to merge 1 commit intoterrastruct:masterfrom
jeffmoss:feat/icon-relative-label-positions
Open

feat: add icon-top and icon-bottom label positions#2721
jeffmoss wants to merge 1 commit intoterrastruct:masterfrom
jeffmoss:feat/icon-relative-label-positions

Conversation

@jeffmoss
Copy link

@jeffmoss jeffmoss commented Feb 22, 2026

Add two new label.near values that position the label relative to the icon rather than the container box:

  • icon-top: label to the right of the icon, top-aligned
  • icon-bottom: label to the right of the icon, bottom-aligned

If the icon is on a right-side position, the label goes to the left instead. Text alignment follows the icon side (left-aligned for left icons, right-aligned for right icons).

This enables side-by-side [icon] Label headers on containers without the icon and label competing for the same outside-top position.

Left aligned snippet:

  cluster-services: "Cluster Services" {
    icon: ./icons/k8s.svg
    icon.near: outside-top-left
    label.near: icon-top
  }

Right aligned snippet:

  cluster-services: "Cluster Services" {
    icon: ./icons/k8s.svg
    icon.near: outside-top-right
    label.near: icon-top
  }

Left aligned:
image

Right aligned:
image

Left-bottom aligned:
image

Add two new label.near values that position the label relative to the
icon rather than the container box:

- icon-top: label to the right of the icon, top-aligned
- icon-bottom: label to the right of the icon, bottom-aligned

If the icon is on a right-side position, the label goes to the left
instead. Text alignment follows the icon side (left-aligned for left
icons, right-aligned for right icons).

This enables side-by-side [icon] Label headers on containers without
the icon and label competing for the same outside-top position.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant