IBM Carbon: density token view

Generated from the normalized JSON extract. Edit the JSON source and rerun the parent render-markdown.ps1 renderer; do not edit this page by hand.

  • Scope: density-relevant public component metrics
  • Architecture model: component size variants; density is not a global product mode
  • Evidence: repository plus official component documentation
  • Exact token coverage: high for component size metrics
  • System report
  • Source record
  • Authoritative JSON

Snapshot

FieldValue
commit82f04fbfdb385323883f4f8e3ce97a14865a744a
retrieved2026-08-11

How density is activated

MechanismPublic implementation
buttonReact size prop -> Carbon size class/layout mixin
textInputReact size prop
dataTableReact size prop -> bx—data-table—{size} class

Density-relevant tokens and values

Token or mappingTypePublic values and metadataSource
Button.size.heightcomponent-size-mapvaluesPx: xs: 24; sm: 32; md: 40; lg: 48; xl: 64; 2xl: 80Carbon Button size documentation and sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_button.scss
layout.size(‘height’)Sass component semanticconsumer: Button block-size and icon-only inline-sizesources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_button.scss
layout.density(‘padding-inline’)Sass component semanticconsumer: Button inline paddingsources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_button.scss
$button-font-sizedimensionvalue: 0.875rem; derivedPx: 14sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_vars.scss
$button-heightdimensionvalue: 3rem; derivedPx: 48; status: legacy/default public variablesources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_vars.scss
DataTable.row.heightcomponent-size-mapvaluesPx: xs: 24; sm: 32; md: 40; lg: 48; xl: 64sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/data-table/_data-table.scss
DataTable.cell.padding-blockcomponent-size-mapvaluesPx: xs: 2px 2px; sm: 7px 6px; md: 7px 6px; xl: spacing-05 spacing-05sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/data-table/_data-table.scss
TextInput.size.heightcomponent-size-mapvaluesPx: sm: 32; md: 40; lg: 48Carbon Text Input size documentation and sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/text-input/_text-input.scss

How tokens reach components

Component or boundaryMapping
buttonsize prop -> generated size class -> layout.size(height) and layout.density(padding-inline); button typography remains 14px across ordinary sizes
dataTablesize prop -> explicit table size modifier -> exact row height/padding CSS
textInputsize prop -> size class -> height rules
coexistencedifferent component sizes can coexist because selection is component-local

Public evidence gaps

  • The captured layout forwarding file does not include the generated Sass maps that resolve every layout.density padding value; exact component heights are independently present in public component CSS/docs.
  • No public global density-mode token collection was found because Carbon exposes component size APIs instead.

Embedded authoritative JSON

Show raw JSON
{
  "system": "IBM Carbon",
  "scope": "density-relevant public component metrics",
  "model": "component size variants; density is not a global product mode",
  "snapshot": {"commit": "82f04fbfdb385323883f4f8e3ce97a14865a744a", "retrieved": "2026-08-11"},
  "activation": {
    "button": "React size prop -> Carbon size class/layout mixin",
    "textInput": "React size prop",
    "dataTable": "React size prop -> bx--data-table--{size} class"
  },
  "tokens": [
    {"name": "Button.size.height", "type": "component-size-map", "valuesPx": {"xs": 24, "sm": 32, "md": 40, "lg": 48, "xl": 64, "2xl": 80}, "source": "Carbon Button size documentation and sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_button.scss"},
    {"name": "layout.size('height')", "type": "Sass component semantic", "consumer": "Button block-size and icon-only inline-size", "source": "sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_button.scss"},
    {"name": "layout.density('padding-inline')", "type": "Sass component semantic", "consumer": "Button inline padding", "source": "sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_button.scss"},
    {"name": "$button-font-size", "type": "dimension", "value": "0.875rem", "derivedPx": 14, "source": "sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_vars.scss"},
    {"name": "$button-height", "type": "dimension", "value": "3rem", "derivedPx": 48, "status": "legacy/default public variable", "source": "sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/button/_vars.scss"},
    {"name": "DataTable.row.height", "type": "component-size-map", "valuesPx": {"xs": 24, "sm": 32, "md": 40, "lg": 48, "xl": 64}, "source": "sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/data-table/_data-table.scss"},
    {"name": "DataTable.cell.padding-block", "type": "component-size-map", "valuesPx": {"xs": "2px 2px", "sm": "7px 6px", "md": "7px 6px", "xl": "spacing-05 spacing-05"}, "source": "sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/data-table/_data-table.scss"},
    {"name": "TextInput.size.height", "type": "component-size-map", "valuesPx": {"sm": 32, "md": 40, "lg": 48}, "source": "Carbon Text Input size documentation and sources/ibm-carbon/upstream/carbon/packages/styles/scss/components/text-input/_text-input.scss"}
  ],
  "componentMappings": {
    "button": "size prop -> generated size class -> layout.size(height) and layout.density(padding-inline); button typography remains 14px across ordinary sizes",
    "dataTable": "size prop -> explicit table size modifier -> exact row height/padding CSS",
    "textInput": "size prop -> size class -> height rules",
    "coexistence": "different component sizes can coexist because selection is component-local"
  },
  "unavailable": [
    "The captured layout forwarding file does not include the generated Sass maps that resolve every layout.density padding value; exact component heights are independently present in public component CSS/docs.",
    "No public global density-mode token collection was found because Carbon exposes component size APIs instead."
  ]
}