{
  "schemaVersion": 1,
  "theme": "j3w1-theme",
  "version": "1.1.0",
  "profile": "default",
  "profileStatus": "approved",
  "release": {
    "version": "1.1.0",
    "stability": "release",
    "policy": "Use the pinned approved default profile. Pending roles in that profile use-and-report their decision IDs; this does not approve them. Proposed profiles are preview-only and blocked for delivery. Heritage profiles are historical-only. Deprecated or heritage roles are blocked for new approved-profile mappings. Consume roles within their documented scope, never primitives. Release numbering does not approve profiles or tokens."
  },
  "sourceDigest": "sha256-C+iD5Q7l0XPU/boMj003wPbPLBOq3C3ZM7s4OfzJ6mc=",
  "id": "icon-button",
  "family": "actions",
  "maturity": "stable",
  "priority": "R1",
  "coverage": {
    "family": "actions",
    "priority": "R1",
    "maturity": "stable",
    "specified": true,
    "demonstrated": true,
    "tested": false,
    "testImplemented": false,
    "states": 7
  },
  "title": "Icon button",
  "summary": "A square ghost button whose only content is a 16px line icon; it always carries an accessible name and, as a toggle, aria-pressed.",
  "anchors": {
    "site": "https://j3w1.github.io/theme/reference/#c-icon-button",
    "spec": "spec/components/icon-button.md",
    "brief": "exports/components/icon-button.brief.txt"
  },
  "native": true,
  "aria": {
    "pattern": "native <button> with aria-label; aria-pressed for the toggle",
    "apg": "https://www.w3.org/WAI/ARIA/apg/patterns/button/"
  },
  "variants": [
    {
      "id": "default",
      "name": "Action",
      "description": "Fires an action; no pressed state."
    },
    {
      "id": "toggle",
      "name": "Toggle",
      "description": "Holds a boolean through aria-pressed."
    }
  ],
  "sizes": [
    "compact",
    "comfortable"
  ],
  "states": [
    "default",
    "hover",
    "focus-visible",
    "active",
    "disabled",
    "toggled",
    "toggled+focus-visible"
  ],
  "tokens": {
    "root.bg": {
      "alias": "color.action.secondary.bg",
      "value": "rgb(0 0 0 / 0%)",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.text": {
      "alias": "color.action.tertiary.text",
      "value": "#e99499",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.bg-hover": {
      "alias": "color.action.tertiary.hover-bg",
      "value": "#1c0a09",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.bg-active": {
      "alias": "color.interaction.pressed.bg",
      "value": "#420f0c",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.border-active": {
      "alias": "color.border.active",
      "value": "#e53935",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.ring": {
      "alias": "color.interaction.focus.ring",
      "value": "#e53935",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.bg-toggled": {
      "alias": "color.interaction.selection.bg",
      "value": "#531310",
      "status": "approved",
      "deprecated": false,
      "decisionId": "D-027",
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.text-toggled": {
      "alias": "color.interaction.selection.text",
      "value": "#f4eeee",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.border-toggled": {
      "alias": "color.border.selected-indicator",
      "value": "#e53935",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.ring-toggled": {
      "alias": "color.interaction.focus.ring-container",
      "value": "#ffa2a7",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.text-disabled": {
      "alias": "color.text.disabled",
      "value": "#8a5559",
      "status": "approved",
      "deprecated": false,
      "decisionId": "D-003",
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.bg-disabled": {
      "alias": "color.interaction.disabled.bg",
      "value": "#160b0b",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "root.border-disabled": {
      "alias": "color.border.disabled",
      "value": "#7d1310",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "icon.stroke": {
      "alias": "color.icon.default",
      "value": "#e99499",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    }
  },
  "stateRules": [
    {
      "state": "default",
      "visual": "{color.action.tertiary.text} icon on nothing; transparent 1px border",
      "channel": "—",
      "tokens": {
        "fg": {
          "alias": "color.action.tertiary.text",
          "value": "#e99499",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.action.secondary.bg",
          "value": "rgb(0 0 0 / 0%)",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    },
    {
      "state": "hover",
      "visual": "background → {color.action.tertiary.hover-bg}",
      "channel": "cursor: pointer; hover-capable pointers only",
      "tokens": {
        "fg": {
          "alias": "color.action.tertiary.text",
          "value": "#e99499",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.action.tertiary.hover-bg",
          "value": "#1c0a09",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    },
    {
      "state": "focus-visible",
      "visual": "ring 1px dashed {color.interaction.focus.ring} at −2px",
      "channel": "the ring",
      "tokens": {
        "fg": {
          "alias": "color.action.tertiary.text",
          "value": "#e99499",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.action.secondary.bg",
          "value": "rgb(0 0 0 / 0%)",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "outline": {
          "alias": "color.interaction.focus.ring",
          "value": "#e53935",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    },
    {
      "state": "active",
      "visual": "background → {color.interaction.pressed.bg}; border → {color.border.active}",
      "channel": "border change; no translation",
      "tokens": {
        "fg": {
          "alias": "color.action.tertiary.text",
          "value": "#e99499",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.interaction.pressed.bg",
          "value": "#420f0c",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "border": {
          "alias": "color.border.active",
          "value": "#e53935",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    },
    {
      "state": "disabled",
      "visual": "{color.text.disabled} on {color.interaction.disabled.bg} with 1px {color.border.disabled}; no hover",
      "channel": "`disabled`; cursor: not-allowed",
      "tokens": {}
    },
    {
      "state": "toggled",
      "visual": "fill {color.interaction.selection.bg} with {color.interaction.selection.text}; border {color.border.selected-indicator}; the icon draws in its filled form",
      "channel": "`aria-pressed=\"true\"`; the filled icon shape; the border",
      "tokens": {
        "fg": {
          "alias": "color.interaction.selection.text",
          "value": "#f4eeee",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.interaction.selection.bg",
          "value": "#531310",
          "status": "approved",
          "deprecated": false,
          "decisionId": "D-027",
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    },
    {
      "state": "toggled+focus-visible",
      "visual": "the selection fill and a ring in {color.interaction.focus.ring-container}",
      "channel": "both visible at once",
      "tokens": {
        "fg": {
          "alias": "color.interaction.selection.text",
          "value": "#f4eeee",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.interaction.selection.bg",
          "value": "#531310",
          "status": "approved",
          "deprecated": false,
          "decisionId": "D-027",
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "outline": {
          "alias": "color.interaction.focus.ring-container",
          "value": "#ffa2a7",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    }
  ],
  "keyboard": [
    {
      "key": "Tab / Shift+Tab",
      "action": "Moves focus to and from the button."
    },
    {
      "key": "Enter / Space",
      "action": "Activates; the toggle variant flips aria-pressed."
    }
  ],
  "responsive": "Fixed square; never shrinks below the density control height, which keeps the 24×24 CSS-pixel target at 320px and in compact density. Direction-neutral; mirrored icons (back, forward) flip in RTL through the host.",
  "portability": {
    "web": "native <button type=\"button\" aria-label=\"…\"> containing one SVG; toggles use aria-pressed, never aria-checked or a class; a tooltip repeats the name on hover and focus.",
    "nativeFallbacks": [
      "GTK4 Button with an icon child and the flat style class; ToggleButton for the toggle.",
      "Qt QToolButton with autoRaise; checkable for the toggle.",
      "Terminal UI: a single glyph in brackets; toggled inverted."
    ]
  },
  "fixtures": [
    "FX-320",
    "FX-ZOOM-200",
    "FX-RM",
    "FX-HC",
    "FX-TOUCH",
    "FX-DENSITY",
    "FX-STATE-MATRIX"
  ],
  "related": [
    "button",
    "toolbar",
    "tooltip",
    "segmented-control"
  ],
  "specimens": [
    "filterable-table",
    "i3-window-frame"
  ],
  "nonExamples": "A circle. An icon button without an accessible name. A toggle that changes\nits label instead of `aria-pressed`. A hover that recolours the icon alone.\nAn emoji or icon-font glyph in place of the SVG. A toggled state shown by\ncolour alone with a line icon. A shadow or scale on press.",
  "contrast": [
    {
      "label": "icon-button default text",
      "state": "default",
      "kind": "text",
      "min": 4.5,
      "fg": "color.action.tertiary.text",
      "bg": "color.action.secondary.bg",
      "fgHex": "#e99499",
      "bgHex": "#000000",
      "ratio": 9.16,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button hover text",
      "state": "hover",
      "kind": "text",
      "min": 4.5,
      "fg": "color.action.tertiary.text",
      "bg": "color.action.tertiary.hover-bg",
      "fgHex": "#e99499",
      "bgHex": "#1c0a09",
      "ratio": 8.35,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button focus-visible text",
      "state": "focus-visible",
      "kind": "text",
      "min": 4.5,
      "fg": "color.action.tertiary.text",
      "bg": "color.action.secondary.bg",
      "fgHex": "#e99499",
      "bgHex": "#000000",
      "ratio": 9.16,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button focus-visible outline",
      "state": "focus-visible",
      "kind": "ui",
      "min": 3,
      "fg": "color.interaction.focus.ring",
      "bg": "color.action.secondary.bg",
      "fgHex": "#e53935",
      "bgHex": "#000000",
      "ratio": 4.97,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button active text",
      "state": "active",
      "kind": "text",
      "min": 4.5,
      "fg": "color.action.tertiary.text",
      "bg": "color.interaction.pressed.bg",
      "fgHex": "#e99499",
      "bgHex": "#420f0c",
      "ratio": 7.02,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button active border",
      "state": "active",
      "kind": "ui",
      "min": 3,
      "fg": "color.border.active",
      "bg": "color.interaction.pressed.bg",
      "fgHex": "#e53935",
      "bgHex": "#420f0c",
      "ratio": 3.81,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button toggled text",
      "state": "toggled",
      "kind": "text",
      "min": 4.5,
      "fg": "color.interaction.selection.text",
      "bg": "color.interaction.selection.bg",
      "fgHex": "#f4eeee",
      "bgHex": "#531310",
      "ratio": 12.47,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button toggled+focus-visible text",
      "state": "toggled+focus-visible",
      "kind": "text",
      "min": 4.5,
      "fg": "color.interaction.selection.text",
      "bg": "color.interaction.selection.bg",
      "fgHex": "#f4eeee",
      "bgHex": "#531310",
      "ratio": 12.47,
      "pass": true,
      "waiver": null
    },
    {
      "label": "icon-button toggled+focus-visible outline",
      "state": "toggled+focus-visible",
      "kind": "ui",
      "min": 3,
      "fg": "color.interaction.focus.ring-container",
      "bg": "color.interaction.selection.bg",
      "fgHex": "#ffa2a7",
      "bgHex": "#531310",
      "ratio": 7.48,
      "pass": true,
      "waiver": null
    },
    {
      "label": "toggled border against the panel",
      "state": "toggled",
      "kind": "ui",
      "min": 3,
      "fg": "color.border.selected-indicator",
      "bg": "color.surface.default",
      "fgHex": "#e53935",
      "bgHex": "#100c0c",
      "ratio": 4.6,
      "pass": true,
      "waiver": null
    },
    {
      "label": "toggled fill against the panel (decorative)",
      "state": "toggled",
      "kind": "ui",
      "min": 3,
      "fg": "color.interaction.selection.bg",
      "bg": "color.surface.default",
      "fgHex": "#531310",
      "bgHex": "#100c0c",
      "ratio": 1.36,
      "pass": false,
      "waiver": "aria-pressed, the filled icon form and the 1px selected-indicator border carry the state; the fill is not the boundary"
    },
    {
      "label": "disabled icon (exempt; house floor 3:1)",
      "state": "disabled",
      "kind": "ui",
      "min": 3,
      "fg": "color.text.disabled",
      "bg": "color.interaction.disabled.bg",
      "fgHex": "#8a5559",
      "bgHex": "#160b0b",
      "ratio": 3.24,
      "pass": true,
      "waiver": null
    },
    {
      "label": "disabled border (exempt)",
      "state": "disabled",
      "kind": "ui",
      "min": 1,
      "fg": "color.border.disabled",
      "bg": "color.interaction.disabled.bg",
      "fgHex": "#7d1310",
      "bgHex": "#160b0b",
      "ratio": 1.82,
      "pass": true,
      "waiver": "disabled controls are exempt from 1.4.11"
    }
  ]
}
