IBM Carbon JS behaviour

Structured List

Key-value rows with flat 1px borders and radio-style selection — Carbon’s featherweight alternative to a full data table for descriptive data.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

Pick a target, deploy

Each row is one control: the radio at the start is invisible until you focus it, the selected row inverts to the selected layer with a carbon-blue spine, and the footer summary follows your choice.

Environment Region Status
Deploying to Build 841 queued — rollback available for one hour.

The same list as plain key-value

Without selection the structured list is just descriptive rows — the server card below reads flush, hugging its frame with no cell padding.

Hostname nabu-app-03
Operating system Ubuntu 24.04 LTS
Time zone Europe/Berlin · CEST
Created 2026/09/14

The whole family

Selection, plain, md sizing and flush — the same two-column rhythm at every size.

selection
uptime99.98%
latency24ms
default
CPU38%
RAM5.2GB
md
Regioneu-de-2
TierBusiness
flush

Important props

Important props
Prop Type Default What it does
selection boolean false Puts a radio at the start of each row and makes the whole row clickable; selection inverts the row to the selected layer.
flush boolean false Flush mode removes the cell padding so the list hugs its frame — for sitting inside dense panels.
size string 'xl' md or xl; xl gives the two-column key-value alignment more room to breathe.

Snippet

<div class="cbsl" role="table" aria-label="Deployment target">
<div class="cbsl-row" role="row" data-head>
<span role="columnheader">Environment</span>
<span role="columnheader">Region</span>
</div>
<label class="cbsl-row" role="row">
<input type="radio" name="env">
<span role="cell">Production</span>
<span role="cell">Berlin</span>
</label>
</div>

<style>
.cbsl { border-block-end: 1px solid #e0e0e0; font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
.cbsl-row { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem;
padding: .75rem 1rem; border-block-start: 1px solid #e0e0e0; }
.cbsl-row[data-head] { font-size: .75rem; color: #525252; }
.cbsl-row:has(input:checked) { background: #e0e0e0; }
</style>
// app/Pages/Deploy.jsx — Inertia (React) page; renders the React
// snippet below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import DeploymentList from '@/components/DeploymentList';

export default function Deploy() {
  return (
    <NabuXUIProvider locale="en" linkComponent={Link}>
      <main className="nx-page">
        <DeploymentList />
      </main>
    </NabuXUIProvider>
  );
}
// DeploymentList.jsx — Carbon structured list, selection variant
import { useState } from 'react';
import '@nabuxai/ui-core/css';

const ENVS = [
  { id: 'prod', name: 'Production', region: 'Frankfurt', cores: 16, zone: 'eu-de-2' },
  { id: 'staging', name: 'Staging', region: 'Dublin', cores: 8, zone: 'eu-ie-1' },
  { id: 'dev', name: 'Development', region: 'Istanbul', cores: 4, zone: 'eu-tr-1' },
];

export default function DeploymentList() {
  const [env, setEnv] = useState('prod');
  const current = ENVS.find((e) => e.id === env);

  return (
    <>
      <style>{`
        .cbsl { max-inline-size: 28rem; border-block-end: 1px solid #e0e0e0; background: #f4f4f4;
                font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
        .cbsl-row { display: grid; grid-template-columns: 2rem 1.1fr 1fr; gap: 1rem; align-items: center;
                    padding: .875rem 1rem; border-block-start: 1px solid #e0e0e0; cursor: pointer; }
        .cbsl-row[data-head] { padding-block: .5rem; font-size: .75rem; color: #525252; cursor: default; }
        .cbsl-row:has(input:checked) { background: #e0e0e0; box-shadow: inset 3px 0 0 #0f62fe; }
        .cbsl input { inline-size: 1.125rem; aspect-ratio: 1; margin: 0; accent-color: #0f62fe; }
        .cbsl small { color: #525252; }
        .cbsl-summary { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem;
                        border-block-start: 2px solid #0f62fe; }
        .cbsl-go { margin-inline-start: auto; block-size: 2.5rem; padding-inline: 1rem; border: none;
                   background: #0f62fe; color: #fff; cursor: pointer; }
      `}</style>
      <div className="cbsl">
        <div className="cbsl-row" role="row" data-head>
          <span aria-hidden="true" />
          <span role="columnheader">Environment</span>
          <span role="columnheader">Region</span>
        </div>
        {/* Every row is one big radio — the selected layer inverts. */}
        {ENVS.map((e) => (
          <label className="cbsl-row" role="row" key={e.id}>
            <input type="radio" name="env" checked={env === e.id} onChange={() => setEnv(e.id)} />
            <b role="cell">{e.name}</b>
            <span role="cell">{e.region} <small>· {e.cores} cores</small></span>
          </label>
        ))}
        <div className="cbsl-summary" role="status">
          <span>Deploying to <b>{current.name}</b> · {current.zone}</span>
          <button type="button" className="cbsl-go">Deploy</button>
        </div>
      </div>
    </>
  );
}
<!-- DeploymentList.vue — Carbon structured list, selection variant -->
<script setup lang="ts">
import { computed, ref } from 'vue';
import '@nabuxai/ui-core/css';

interface Env { id: string; name: string; region: string; cores: number; zone: string }
const envs: Env[] = [
  { id: 'prod', name: 'Production', region: 'Frankfurt', cores: 16, zone: 'eu-de-2' },
  { id: 'staging', name: 'Staging', region: 'Dublin', cores: 8, zone: 'eu-ie-1' },
  { id: 'dev', name: 'Development', region: 'Istanbul', cores: 4, zone: 'eu-tr-1' },
];
const env = ref('prod');
const current = computed(() => envs.find((e) => e.id === env.value)!);
</script>

<template>
  <div class="cbsl">
    <div class="cbsl-row" role="row" data-head>
      <span aria-hidden="true"></span>
      <span role="columnheader">Environment</span>
      <span role="columnheader">Region</span>
    </div>
    <!-- Every row is one big radio — the selected layer inverts. -->
    <label v-for="e in envs" :key="e.id" class="cbsl-row" role="row">
      <input v-model="env" type="radio" name="env" :value="e.id" />
      <b role="cell">{{ e.name }}</b>
      <span role="cell">{{ e.region }} <small>· {{ e.cores }} cores</small></span>
    </label>
    <div class="cbsl-summary" role="status">
      <span>Deploying to <b>{{ current.name }}</b> · {{ current.zone }}</span>
      <button type="button" class="cbsl-go">Deploy</button>
    </div>
  </div>
</template>

<style scoped>
.cbsl { max-inline-size: 28rem; border-block-end: 1px solid #e0e0e0; background: #f4f4f4;
        font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
.cbsl-row { display: grid; grid-template-columns: 2rem 1.1fr 1fr; gap: 1rem; align-items: center;
            padding: .875rem 1rem; border-block-start: 1px solid #e0e0e0; cursor: pointer; }
.cbsl-row[data-head] { padding-block: .5rem; font-size: .75rem; color: #525252; cursor: default; }
.cbsl-row:has(input:checked) { background: #e0e0e0; box-shadow: inset 3px 0 0 #0f62fe; }
.cbsl input { inline-size: 1.125rem; aspect-ratio: 1; margin: 0; accent-color: #0f62fe; }
.cbsl small { color: #525252; }
.cbsl-summary { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem;
                border-block-start: 2px solid #0f62fe; }
.cbsl-go { margin-inline-start: auto; block-size: 2.5rem; padding-inline: 1rem; border: none;
           background: #0f62fe; color: #fff; cursor: pointer; }
</style>
<!-- DeploymentList.svelte — Carbon structured list, selection variant -->
<script lang="ts">
  import '@nabuxai/ui-core/css';

  interface Env { id: string; name: string; region: string; cores: number; zone: string }
  const envs: Env[] = [
    { id: 'prod', name: 'Production', region: 'Frankfurt', cores: 16, zone: 'eu-de-2' },
    { id: 'staging', name: 'Staging', region: 'Dublin', cores: 8, zone: 'eu-ie-1' },
    { id: 'dev', name: 'Development', region: 'Istanbul', cores: 4, zone: 'eu-tr-1' },
  ];
  let env = $state('prod');
  const current = $derived(envs.find((e) => e.id === env)!);
</script>

<div class="cbsl">
  <div class="cbsl-row" role="row" data-head>
    <span aria-hidden="true"></span>
    <span role="columnheader">Environment</span>
    <span role="columnheader">Region</span>
  </div>
  <!-- Every row is one big radio — the selected layer inverts. -->
  {#each envs as e (e.id)}
    <label class="cbsl-row" role="row">
      <input type="radio" name="env" value={e.id} checked={env === e.id} onchange={() => (env = e.id)} />
      <b role="cell">{e.name}</b>
      <span role="cell">{e.region} <small>· {e.cores} cores</small></span>
    </label>
  {/each}
  <div class="cbsl-summary" role="status">
    <span>Deploying to <b>{current.name}</b> · {current.zone}</span>
    <button type="button" class="cbsl-go">Deploy</button>
  </div>
</div>

<style>
.cbsl { max-inline-size: 28rem; border-block-end: 1px solid #e0e0e0; background: #f4f4f4;
        font: 400 .875rem/1.4 'IBM Plex Sans', sans-serif; }
.cbsl-row { display: grid; grid-template-columns: 2rem 1.1fr 1fr; gap: 1rem; align-items: center;
            padding: .875rem 1rem; border-block-start: 1px solid #e0e0e0; cursor: pointer; }
.cbsl-row[data-head] { padding-block: .5rem; font-size: .75rem; color: #525252; cursor: default; }
.cbsl-row:has(input:checked) { background: #e0e0e0; box-shadow: inset 3px 0 0 #0f62fe; }
.cbsl input { inline-size: 1.125rem; aspect-ratio: 1; margin: 0; accent-color: #0f62fe; }
.cbsl small { color: #525252; }
.cbsl-summary { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem;
                border-block-start: 2px solid #0f62fe; }
.cbsl-go { margin-inline-start: auto; block-size: 2.5rem; padding-inline: 1rem; border: none;
           background: #0f62fe; color: #fff; cursor: pointer; }
</style>