# Badge Style

Canonical page: https://www.adaptabletools.com/docs/handbook-styled-column-badge

- Badge Style decorates each cell value with one or more styled "pills" (labels)
- Each pill is fully customisable — colours, border, font, shape and icon
- Multiple Badges can be defined per column and selectively rendered using a Rule
- Array columns render one pill per element (with spacing and overflow options)
- Column-level options control inner padding, cell chrome behind the pills and alignment

The Badge Style renders the text of a Cell inside a "Badge" (sometimes known as a label).

The Badge can be fully styled, i.e. coloured, given a shape and border etc.

Badges can only be applied to **Numeric**, **String** or **array** (`textArray` / `numberArray`) columns

Multiple Badges can be provided for the same Column using Rules.

Badges can optionally include an Icon to display next to the text.

It is also possible to provide an Icon-only Badge where no text is displayed

## Anatomy

A Badge Style is composed of one or more **pills** plus a set of column-level options.

Each pill has:

- A **`PillStyle`** — back / fore / border colour, font weight / style, text decoration
- A **`Shape`** — `Pill`, `Rounded` _(default)_ or `Square`
- The **cell text** rendered inside the pill
- An optional **`IconProperties`** group — System or Custom `Icon`, drawn at the `Start` _(default)_ or `End` of the pill (`Position`), with optional `Gap` and `IconOnly`
- An optional **Rule** (a boolean `Expression`) that decides whether the pill renders for a given cell

- Pills are evaluated **top-down** — the first matching Badge in the `Badges` array wins
- For **array** columns (`textArray` / `numberArray`), AdapTable draws **one pill per element**

Column-level options on `BadgeStyle` apply to every pill in the column:

- **`Density`** — inner padding preset (`Compact` / `Normal` / `Comfortable`)
- **`Cell`** — chrome of the cell **behind** the pills (background, border, radius)
- **`Font.Alignment`** — positions the badge row (`Left` / `Center` / `Right`) within the cell
- **`Spacing`** and **`OverflowMode`** — how multiple pills lay out in array cells (gap; truncate / wrap / scroll)

**Example: Badge Styled Columns**

Displaying Badge Styles

- Overview demo — five columns in one grid (see the focused demos below for one idea per sandpack):
  - **name** — single gray pill (`Density: Compact`)
  - **Language** — icon-only pills per language ([custom inline icons](#custom-icons); no `PillStyle`)
  - **License** — three rules with different `PillStyle` colours
  - **Closed Issues** — three numeric rules with system icons (`Density: Comfortable`)
  - **topics** — array column: per-topic rules, default fallback pill, `OverflowMode: Wrap`

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Badge Styled Columns',
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'StyledColumn',
      Layouts: [
        {
          Name: 'StyledColumn',
          TableColumns: [
            'name',
            'github_stars',
            'language',
            'open_issues_count',
            'license',
            'open_pr_count',
            'closed_issues_count',
            'topics',
            'closed_pr_count',
            'has_wiki',
            'week_issue_change',
            'has_projects',
          ],
          AutoSizeColumns: true,
          ColumnSizing: {
            name: {Width: 100},
            github_stars: {Width: 90},
            language: {Width: 130},
            open_issues_count: {Width: 90},
            license: {Width: 120},
            open_pr_count: {Width: 100},
            closed_issues_count: {Width: 100},
            topics: {Width: 500},
          },
        },
      ],
    },

    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'name',
          Name: 'name Badge',   
          BadgeStyle: {
            Density: 'Compact',
            Badges: [
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
              },
            ],
          },
        },
        {
          ColumnId: 'license',
          Name: 'license Badge',  
          BadgeStyle: {
            Badges: [
              {
                Shape: 'Rounded',
                Rule: '[license] = "MIT License"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-23)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Shape: 'Rounded',
                Rule: '[license] = "BSD 3-Clause"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-17)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Shape: 'Rounded',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-28)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
                Rule: '[license] = "Other"',
              },
            ],
          },
        },
        {
          ColumnId: 'language',
          Name: 'language Badge',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[language] = "JavaScript"',
                IconProperties: {
                  Icon: {
                    src: 'https://upload.wikimedia.org/wikipedia/commons/9/99/Unofficial_JavaScript_logo_2.svg',
                  },
                },
              },
              {
                Rule: '[language] = "TypeScript"',
                IconProperties: {
                  Icon: {
                    src: 'https://upload.wikimedia.org/wikipedia/commons/4/4c/Typescript_logo_2020.svg',
                  },
                },
              },
              {
                Rule: '[language] = "HTML"',
                IconProperties: {
                  Icon: {
                    src: 'https://upload.wikimedia.org/wikipedia/commons/6/61/HTML5_logo_and_wordmark.svg',
                  },
                },
              },
            ],
          },
        },
        {
          ColumnId: 'closed_issues_count',
          Name: 'closed_issues_count Badge',
          BadgeStyle: {
            Density: 'Comfortable',
            Badges: [
              {
                Shape: 'Pill',
                Rule: '[closed_issues_count] < 1000',
                IconProperties: {
                  Icon: {
                    name: 'alert',
                  },
                },
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-30)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Shape: 'Pill',
                Rule: '[closed_issues_count] < 10000',
                IconProperties: {
                  Icon: {
                    name: 'flag',
                  },
                },
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-32)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-19)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
                IconProperties: {
                  Icon: {
                    name: 'checked',
                  },
                },
              },
            ],
          },
        },
        {
          ColumnId: 'topics',
          Name: 'topics Badge',
          BadgeStyle: {
            Density: 'Compact',
            Spacing: 4,
            OverflowMode: 'Wrap',
            Badges: [
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-21)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: '[topics] = "javascript"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: '#2761B9',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
                Rule: '[topics] = "typescript"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-16)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    field: 'id',
    cellDataType: 'number',
    hide: true,
    editable: false,
  },
  {
    headerName: 'History - Line',
    colId: 'historyLine',
    field: 'history',
    editable: false,
    floatingFilter: false,
    filter: false,
    resizable: true,
    cellDataType: 'numberArray',
  },
  {
    headerName: 'History - Area',
    colId: 'historyArea',
    field: 'history',
    editable: false,
    floatingFilter: false,
    filter: false,
    resizable: true,
    cellDataType: 'numberArray',
  },
  {
    field: 'name',
    cellDataType: 'text',
  },
  {
    field: 'language',
    cellDataType: 'text',
    enablePivot: true,
    enableRowGroup: true,
  },
  {
    field: 'week_issue_change',
    headerName: 'Issue Change',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'github_stars',
    headerName: 'GitHub Stars',
    cellDataType: 'number',
    enableValue: true,
  },

  {
    field: 'license',
    cellDataType: 'text',
    editable: false,
    enablePivot: true,
    enableRowGroup: true,
  },
  {
    field: 'created_at',
    headerName: 'Created',
    cellDataType: 'date',
  },
  {field: 'has_wiki', headerName: 'Has Wiki', cellDataType: 'boolean'},
  {
    field: 'updated_at',
    headerName: 'Updated',
    cellDataType: 'date',
  },
  {
    field: 'pushed_at',
    headerName: 'Pushed',
    cellDataType: 'date',
  },
  {
    field: 'github_watchers',
    headerName: 'GitHub Watchers',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'description',
    cellDataType: 'text',
    sortable: false,
  },
  {
    field: 'open_issues_count',
    headerName: 'Open Issues',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'closed_issues_count',
    headerName: 'Closed Issues',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'open_pr_count',
    headerName: 'Open PRs',
    cellDataType: 'number',
    enableValue: true,
  },
  {
    field: 'closed_pr_count',
    headerName: 'Closed PRs',
    cellDataType: 'number',
    enableValue: true,
  },
  {field: 'has_projects', headerName: 'Has Projects', cellDataType: 'boolean'},
  {field: 'has_pages', headerName: 'Has Pages', cellDataType: 'boolean'},
  {
    field: 'topics',
    cellDataType: 'textArray',
    editable: false,
    sortable: false,
    autoHeight: true,
  },
];
```

**`src/rowData.ts`**

```ts
export const rowData = [
  {
    id: 10270250,
    name: 'react',
    full_name: 'facebook/react',
    html_url: 'https://github.com/facebook/react',
    description:
      'A declarative, efficient, and flexible JavaScript library for building user interfaces.',
    created_at: new Date('2013-05-24T16:15:54').toDateString(),
    updated_at: new Date('2021-12-20T09:03:49').toDateString(),
    pushed_at: new Date('2021-12-19T14:34:59').toDateString(),
    homepage: 'https://reactjs.org',
    github_stars: 179429,
    language: 'JavaScript',
    forks_count: 36403,
    open_issues_count: 920,
    license: 'MIT License',
    topics: ['declarative', 'frontend', 'javascript', 'library', 'react', 'ui'],
    github_watchers: 6671,
    has_projects: true,
    has_wiki: true,
    has_pages: true,
    closed_issues_count: 10326,
    open_pr_count: 249,
    closed_pr_count: 11408,
    week_issue_change: 5,
    history: [27, 5, 13, 25, 12, 17, 11, 27],
  },
  {
    id: 24195339,
    name: 'angular',
    full_name: 'angular/angular',
    html_url: 'https://github.com/angular/angular',
    description: 'The modern web developer’s platform',
    created_at: new Date('2014-09-18T16:12:01').toDateString(),
    updated_at: new Date('2021-12-20T08:37:07').toDateString(),
    pushed_at: new Date('2021-12-19T21:54:01').toDateString(),
    homepage: 'https://angular.io',
    github_stars: 78348,
    language: 'TypeScript',
    forks_count: 20569,
    open_issues_count: 1889,
    license: 'MIT License',
    topics: [
      'angular',
      'javascript',
      'pwa',
      'typescript',
      'web',
      'web-framework',
      'web-performance',
    ],
    github_watchers: 3119,
    has_projects: true,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 21706,
    open_pr_count: 159,
    closed_pr_count: 20052,
    week_issue_change: 12,
    history: [22, 28, 17, 25, 26, 20, 2, 30, 17, 19, 12, 9, 25, 22, 18],
  },
  {
    id: 11730342,
    name: 'vue',
    full_name: 'vuejs/vue',
    html_url: 'https://github.com/vuejs/vue',
    description:
      '🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.',
    created_at: new Date('2013-07-29T03:24:51').toDateString(),
    updated_at: new Date('2021-12-20T08:47:06').toDateString(),
    pushed_at: new Date('2021-12-20T08:10:16').toDateString(),
    homepage: 'http://vuejs.org',
    github_stars: 191435,
    language: 'JavaScript',
    forks_count: 30945,
    open_issues_count: 546,
    license: 'MIT License',
    topics: ['framework', 'frontend', 'javascript', 'vue'],
    github_watchers: 6187,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 9318,
    open_pr_count: 224,
    closed_pr_count: 1878,
    week_issue_change: -9,
    history: [22, 22, 24, 18, 11, 28],
  },
  {
    id: 74293321,
    name: 'svelte',
    full_name: 'sveltejs/svelte',
    html_url: 'https://github.com/sveltejs/svelte',
    description: 'Cybernetically enhanced web apps',
    created_at: new Date('2016-11-20T18:13:05').toDateString(),
    updated_at: new Date('2021-12-20T08:56:37').toDateString(),
    pushed_at: new Date('2021-12-19T14:53:30').toDateString(),
    homepage: 'https://svelte.dev',
    github_stars: 53935,
    language: 'TypeScript',
    forks_count: 2584,
    open_issues_count: 604,
    license: 'BSD 3-Clause',
    topics: ['compiler', 'template', 'ui'],
    github_watchers: 874,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 3549,
    open_pr_count: 104,
    closed_pr_count: 2738,
    week_issue_change: 14,
    history: [16, 21, 3, 1, 1, 11, 30, 20, 27, 18],
  },
  {
    id: 224663696,
    name: 'alpine',
    full_name: 'alpinejs/alpine',
    html_url: 'https://github.com/alpinejs/alpine',
    description:
      'A rugged, minimal framework for composing JavaScript behavior in your markup. ',
    created_at: new Date('2019-11-28T13:51:55').toDateString(),
    updated_at: new Date('2021-12-20T08:12:43').toDateString(),
    pushed_at: new Date('2021-12-14T16:02:26').toDateString(),
    homepage: 'https://alpinejs.dev',
    github_stars: 19338,
    language: 'HTML',
    forks_count: 837,
    open_issues_count: 19,
    license: 'MIT License',
    topics: [],
    github_watchers: 202,
    has_projects: false,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 544,
    open_pr_count: 13,
    closed_pr_count: 546,
    week_issue_change: 21,
    history: [15, 13, 26, 8, 19, 12, 25, 12],
  },
  {
    id: 95797174,
    name: 'lit',
    full_name: 'lit/lit',
    html_url: 'https://github.com/lit/lit',
    description:
      'Lit is a simple library for building fast, lightweight web components.',
    created_at: new Date('2017-06-29T16:27:16').toDateString(),
    updated_at: new Date('2021-12-20T07:20:35').toDateString(),
    pushed_at: new Date('2021-12-17T03:45:26').toDateString(),
    homepage: 'https://lit.dev',
    github_stars: 9752,
    language: 'JavaScript',
    forks_count: 528,
    open_issues_count: 207,
    license: 'BSD 3-Clause',
    topics: ['html-templates', 'lit', 'lit-element', 'typescript'],
    github_watchers: 204,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 895,
    open_pr_count: 53,
    closed_pr_count: 1138,
    week_issue_change: -45,
    history: [17, 16, 23, 16, 3, 7],
  },
  {
    id: 76694515,
    name: 'stimulus',
    full_name: 'hotwired/stimulus',
    html_url: 'https://github.com/hotwired/stimulus',
    description: 'A modest JavaScript framework for the HTML you already have',
    created_at: new Date('2016-12-17T00:19:29').toDateString(),
    updated_at: new Date('2021-12-20T07:20:01').toDateString(),
    pushed_at: new Date('2021-12-17T20:47:34').toDateString(),
    homepage: 'https://stimulus.hotwired.dev/',
    github_stars: 11049,
    language: 'TypeScript',
    forks_count: 316,
    open_issues_count: 17,
    license: 'MIT License',
    topics: [],
    github_watchers: 221,
    has_projects: false,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 282,
    open_pr_count: 5,
    closed_pr_count: 191,
    week_issue_change: -11,
    history: [
      5, 10, 12, 21, 13, 15, 17, 13, 22, 2, 13, 10, 11, 5, 5, 7, 29, 16,
    ],
  },
  {
    id: 1801829,
    name: 'ember.js',
    full_name: 'emberjs/ember.js',
    html_url: 'https://github.com/emberjs/ember.js',
    description:
      'Ember.js - A JavaScript framework for creating ambitious web applications',
    created_at: new Date('2011-05-25T23:39:40').toDateString(),
    updated_at: new Date('2021-12-19T07:57:31').toDateString(),
    pushed_at: new Date('2021-12-20T07:15:54').toDateString(),
    homepage: 'https://emberjs.com',
    github_stars: 22093,
    language: 'JavaScript',
    forks_count: 4253,
    open_issues_count: 427,
    license: 'BSD 3-Clause',
    topics: ['ember', 'hacktoberfest', 'javascript', 'javascript-framework'],
    github_watchers: 908,
    has_projects: true,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 6187,
    open_pr_count: 94,
    closed_pr_count: 9574,
    week_issue_change: -22,
    history: [
      30, 19, 4, 25, 24, 19, 29, 20, 29, 19, 28, 13, 27, 2, 7, 7, 21, 25, 23,
      15,
    ],
  },
  {
    id: 82095231,
    name: 'stencil',
    full_name: 'ionic-team/stencil',
    html_url: 'https://github.com/ionic-team/stencil',
    description:
      'A toolchain for building scalable, enterprise-ready component systems on top of TypeScript.',
    created_at: new Date('2017-02-15T18:57:07').toDateString(),
    updated_at: new Date('2021-12-20T05:46:50').toDateString(),
    pushed_at: new Date('2021-12-16T21:15:17').toDateString(),
    homepage: 'https://stenciljs.com',
    github_stars: 9884,
    language: 'TypeScript',
    forks_count: 641,
    open_issues_count: 499,
    license: 'Other',
    topics: [
      'typescript',
      'ionic',
      'progressive-web-app',
      'pwa',
      'ssg',
      'ssr',
      'static-site-generator',
      'stencil',
      'stenciljs',
      'typescript',
      'webcomponents',
    ],
    github_watchers: 203,
    has_projects: true,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 1929,
    open_pr_count: 46,
    closed_pr_count: 743,
    week_issue_change: 12,
    history: [25, 17, 13, 5, 2, 18, 26, 11, 23, 23],
  },
  {
    id: 130884470,
    name: 'solid',
    full_name: 'solidjs/solid',
    html_url: 'https://github.com/solidjs/solid',
    description:
      'A declarative, efficient, and flexible JavaScript library for building user interfaces.',
    created_at: new Date('2018-04-24T16:36:27').toDateString(),
    updated_at: new Date('2021-12-20T08:29:47').toDateString(),
    pushed_at: new Date('2021-12-19T21:06:01').toDateString(),
    homepage: 'https://solidjs.com',
    github_stars: 13119,
    language: 'TypeScript',
    forks_count: 330,
    open_issues_count: 21,
    license: 'MIT License',
    topics: [
      'declarative',
      'fine-grained',
      'javascript',
      'jsx',
      'performance',
      'proxies',
      'reactive',
      'solid',
    ],
    github_watchers: 161,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 366,
    open_pr_count: 3,
    closed_pr_count: 164,
    week_issue_change: 23,
    history: [14, 22, 5, 13, 5, 30, 28, 15, 19, 11, 28, 24, 4, 2, 10, 30],
  },
  {
    id: 17814354,
    name: 'mithril.js',
    full_name: 'MithrilJS/mithril.js',
    html_url: 'https://github.com/MithrilJS/mithril.js',
    description: 'A JavaScript Framework for Building Brilliant Applications',
    created_at: new Date('2014-03-17T01:59:39').toDateString(),
    updated_at: new Date('2021-12-20T03:17:55').toDateString(),
    pushed_at: new Date('2021-11-24T10:16:47').toDateString(),
    homepage: 'https://mithril.js.org',
    github_stars: 13064,
    language: 'JavaScript',
    forks_count: 940,
    open_issues_count: 173,
    license: 'BSD 3-Clause',
    topics: [
      'framework',
      'javascript',
      'mithril',
      'router',
      'vdom',
      'virtual-dom',
      'xhr',
    ],
    github_watchers: 324,
    has_projects: true,
    has_wiki: true,
    has_pages: true,
    closed_issues_count: 1368,
    open_pr_count: 28,
    closed_pr_count: 1144,
    week_issue_change: 57,
    history: [25, 18, 2, 23, 19],
  },
  {
    id: 167174,
    name: 'jquery',
    full_name: 'jquery/jquery',
    html_url: 'https://github.com/jquery/jquery',
    description: 'jQuery JavaScript Library',
    created_at: new Date('2009-04-03T15:20:14').toDateString(),
    updated_at: new Date('2021-12-20T06:13:48').toDateString(),
    pushed_at: new Date('2021-12-17T16:50:04').toDateString(),
    homepage: 'https://jquery.com',
    github_stars: 55666,
    language: 'JavaScript',
    forks_count: 20187,
    open_issues_count: 84,
    license: 'MIT License',
    topics: ['jquery'],
    github_watchers: 3306,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 2083,
    open_pr_count: 13,
    closed_pr_count: 2692,
    week_issue_change: 15,
    history: [1, 7, 3, 3, 3, 22, 1, 12, 16, 15, 22],
  },
  {
    id: 5532320,
    name: 'polymer',
    full_name: 'Polymer/polymer',
    html_url: 'https://github.com/Polymer/polymer',
    description: 'Our original Web Component library.',
    created_at: new Date('2012-08-23T20:56:30').toDateString(),
    updated_at: new Date('2021-12-19T05:05:03').toDateString(),
    pushed_at: new Date('2021-12-07T22:20:44').toDateString(),
    homepage: 'https://polymer-library.polymer-project.org/',
    github_stars: 21724,
    language: 'HTML',
    forks_count: 2026,
    open_issues_count: 281,
    license: 'Other',
    topics: ['polymer', 'web-components'],
    github_watchers: 894,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 3648,
    open_pr_count: 26,
    closed_pr_count: 1404,
    week_issue_change: 9,
    history: [5, 6, 25, 7, 17, 6, 19, 27, 21, 5, 18],
  },
  {
    id: 952189,
    name: 'backbone',
    full_name: 'jashkenas/backbone',
    html_url: 'https://github.com/jashkenas/backbone',
    description:
      'Give your JS App some Backbone with Models, Views, Collections, and Events',
    created_at: new Date('2010-09-30T19:41:28').toDateString(),
    updated_at: new Date('2021-12-19T05:50:57').toDateString(),
    pushed_at: new Date('2020-05-19T16:52:55').toDateString(),
    homepage: 'http://backbonejs.org',
    github_stars: 27840,
    language: 'JavaScript',
    forks_count: 5608,
    open_issues_count: 85,
    license: 'MIT License',
    topics: [],
    github_watchers: 1365,
    has_projects: true,
    has_wiki: true,
    has_pages: true,
    closed_issues_count: 2335,
    open_pr_count: 32,
    closed_pr_count: 1797,
    week_issue_change: -14,
    history: [
      25, 26, 4, 14, 6, 22, 1, 4, 24, 28, 6, 28, 13, 22, 24, 8, 8, 8, 8, 27,
    ],
  },
  {
    id: 757363,
    name: 'knockout',
    full_name: 'knockout/knockout',
    html_url: 'https://github.com/knockout/knockout',
    description:
      'Knockout makes it easier to create rich, responsive UIs with JavaScript',
    created_at: new Date('2010-07-05T08:08:34').toDateString(),
    updated_at: new Date('2021-12-18T17:20:52').toDateString(),
    pushed_at: new Date('2021-10-09T07:42:49').toDateString(),
    homepage: 'http://knockoutjs.com/',
    github_stars: 10122,
    language: 'JavaScript',
    forks_count: 1571,
    open_issues_count: 362,
    license: 'Other',
    topics: ['data-binding', 'javascript', 'knockout', 'mvvm'],
    github_watchers: 549,
    has_projects: true,
    has_wiki: true,
    has_pages: true,
    closed_issues_count: 1534,
    open_pr_count: 72,
    closed_pr_count: 670,
    week_issue_change: 63,
    history: [23, 19, 6, 28, 5],
  },
  {
    id: 191051391,
    name: 'redwood',
    full_name: 'redwoodjs/redwood',
    html_url: 'https://github.com/redwoodjs/redwood',
    description: 'The App Framework for Startups',
    created_at: new Date('2019-06-09T20:17:57').toDateString(),
    updated_at: new Date('2021-12-20T01:41:55').toDateString(),
    pushed_at: new Date('2021-12-20T00:37:09').toDateString(),
    homepage: 'https://redwoodjs.com',
    github_stars: 10334,
    language: 'TypeScript',
    forks_count: 431,
    open_issues_count: 269,
    license: 'MIT License',
    topics: [
      'apollo',
      'graphql',
      'hacktoberfest',
      'jamstack',
      'prisma',
      'react',
    ],
    github_watchers: 80,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 1071,
    open_pr_count: 35,
    closed_pr_count: 2602,
    week_issue_change: 14,
    history: [1, 21, 16, 8, 9, 13],
  },
  {
    id: 36040894,
    name: 'gatsby',
    full_name: 'gatsbyjs/gatsby',
    html_url: 'https://github.com/gatsbyjs/gatsby',
    description: 'Build blazing fast, modern apps and websites with React',
    created_at: new Date('2015-05-21T22:43:05').toDateString(),
    updated_at: new Date('2021-12-20T09:04:22').toDateString(),
    pushed_at: new Date('2021-12-20T08:04:34').toDateString(),
    homepage: 'https://www.gatsbyjs.com',
    github_stars: 51931,
    language: 'JavaScript',
    forks_count: 10049,
    open_issues_count: 359,
    license: 'MIT License',
    topics: [
      'blog',
      'compiler',
      'documentation-tool',
      'gatsby',
      'graphql',
      'react',
      'static-site-generator',
      'web-app',
    ],
    github_watchers: 853,
    has_projects: true,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 12975,
    open_pr_count: 180,
    closed_pr_count: 19058,
    week_issue_change: -34,
    history: [10, 13, 12, 22, 4, 14, 27, 11, 18, 9, 21, 12],
  },
  {
    id: 26316966,
    name: 'cyclejs',
    full_name: 'cyclejs/cyclejs',
    html_url: 'https://github.com/cyclejs/cyclejs',
    description:
      'A functional and reactive JavaScript framework for predictable code',
    created_at: new Date('2014-11-07T11:28:45').toDateString(),
    updated_at: new Date('2021-12-20T06:39:49').toDateString(),
    pushed_at: new Date('2021-12-17T11:03:37').toDateString(),
    homepage: 'http://cycle.js.org',
    github_stars: 9999,
    language: 'TypeScript',
    forks_count: 421,
    open_issues_count: 102,
    license: 'MIT License',
    topics: [
      'cyclejs',
      'framework',
      'functional-programming',
      'hacktoberfest',
      'javascript',
      'reactive-programming',
      'rxjs',
      'typescript',
    ],
    github_watchers: 205,
    has_projects: true,
    has_wiki: true,
    has_pages: true,
    closed_issues_count: 563,
    open_pr_count: 26,
    closed_pr_count: 301,
    week_issue_change: -2,
    history: [27, 19, 25, 1, 17, 16, 9, 17, 1, 25, 24, 13, 26, 7, 12, 7, 5],
  },
  {
    id: 42283287,
    name: 'preact',
    full_name: 'preactjs/preact',
    html_url: 'https://github.com/preactjs/preact',
    description:
      '⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.',
    created_at: new Date('2015-09-11T02:40:18').toDateString(),
    updated_at: new Date('2021-12-20T09:02:15').toDateString(),
    pushed_at: new Date('2021-12-17T23:21:58').toDateString(),
    homepage: 'https://preactjs.com',
    github_stars: 30538,
    language: 'JavaScript',
    forks_count: 1702,
    open_issues_count: 222,
    license: 'MIT License',
    topics: [
      'components',
      'dom',
      'jsx',
      'preact',
      'react',
      'vdom',
      'virtual-dom',
    ],
    github_watchers: 425,
    has_projects: true,
    has_wiki: true,
    has_pages: true,
    closed_issues_count: 1309,
    open_pr_count: 78,
    closed_pr_count: 1729,
    week_issue_change: -12,
    history: [
      18, 3, 17, 22, 11, 26, 6, 1, 21, 16, 12, 13, 15, 19, 11, 12, 10, 21, 3,
    ],
  },
  {
    id: 13142126,
    name: 'riot',
    full_name: 'riot/riot',
    html_url: 'https://github.com/riot/riot',
    description: 'Simple and elegant component-based UI library',
    created_at: new Date('2013-09-27T05:21:01').toDateString(),
    updated_at: new Date('2021-12-20T05:17:31').toDateString(),
    pushed_at: new Date('2021-12-17T20:09:25').toDateString(),
    homepage: 'https://riot.js.org',
    github_stars: 14597,
    language: 'JavaScript',
    forks_count: 1032,
    open_issues_count: 5,
    license: 'Other',
    topics: [
      'client-side',
      'typescript',
      'typescripts',
      'customtags',
      'elegant',
      'framework',
      'javascript',
      'lite',
      'minimal',
      'simple',
      'view',
      'webcomponents',
    ],
    github_watchers: 412,
    has_projects: true,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 2147,
    open_pr_count: 0,
    closed_pr_count: 755,
    week_issue_change: 0,
    history: [[26, 30, 10, 4, 5, 29, 8, 8, 2, 28, 17, 10, 27, 18, 8, 20]],
  },
  {
    id: 121594173,
    name: 'aurelia',
    full_name: 'aurelia/aurelia',
    html_url: 'https://github.com/aurelia/aurelia',
    description:
      'Aurelia 2, a standards-based, front-end framework designed for high-performing, ambitious applications.',
    created_at: new Date('2018-02-15T05:22:58').toDateString(),
    updated_at: new Date('2021-12-19T04:23:43').toDateString(),
    pushed_at: new Date('2021-11-28T16:21:43').toDateString(),
    homepage: '',
    github_stars: 1142,
    language: 'TypeScript',
    forks_count: 121,
    open_issues_count: 143,
    license: 'MIT License',
    topics: [
      'aurelia',
      'cordova',
      'cross-platform',
      'electron',
      'framework',
      'frontend',
      'html',
      'javascript',
      'javascript-framework',
      'mobile',
      'pwa',
      'single-page-applications',
      'spa',
      'typescript',
      'web',
      'web-framework',
      'web-performance',
    ],
    github_watchers: 66,
    has_projects: true,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 214,
    open_pr_count: 17,
    closed_pr_count: 959,
    week_issue_change: 32,
    history: [13, 6, 10, 15, 16, 30, 25, 1],
  },
  {
    id: 70107786,
    name: 'next.js',
    full_name: 'vercel/next.js',
    html_url: 'https://github.com/vercel/next.js',
    description: 'The React Framework',
    created_at: new Date('2016-10-05T23:32:51').toDateString(),
    updated_at: new Date('2021-12-20T08:57:47').toDateString(),
    pushed_at: new Date('2021-12-20T08:21:58').toDateString(),
    homepage: 'https://nextjs.org',
    github_stars: 78446,
    language: 'JavaScript',
    forks_count: 15787,
    open_issues_count: 1361,
    license: 'MIT License',
    topics: [
      'blog',
      'browser',
      'compiler',
      'components',
      'hybrid',
      'nextjs',
      'node',
      'react',
      'server-rendering',
      'ssg',
      'static',
      'static-site-generator',
      'universal',
      'vercel',
    ],
    github_watchers: 1224,
    has_projects: false,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 10320,
    open_pr_count: 254,
    closed_pr_count: 9849,
    week_issue_change: 63,
    history: [30, 5, 1, 5, 18, 2, 13, 25, 27, 26, 20, 25, 18, 35],
  },
  {
    id: 71995937,
    name: 'nuxt.js',
    full_name: 'nuxt/nuxt.js',
    html_url: 'https://github.com/nuxt/nuxt.js',
    description: 'The Intuitive Vue(2) Framework',
    created_at: new Date('2016-10-26T11:18:47').toDateString(),
    updated_at: new Date('2021-12-20T08:27:45').toDateString(),
    pushed_at: new Date('2021-12-20T08:05:15').toDateString(),
    homepage: 'https://nuxtjs.org',
    github_stars: 38997,
    language: 'JavaScript',
    forks_count: 3157,
    open_issues_count: 464,
    license: 'Other',
    topics: [
      'framework',
      'typescript',
      'nuxt',
      'server-rendering',
      'ssr',
      'universal',
      'vue',
      'vue-router',
      'vuex',
      'web-app',
    ],
    github_watchers: 772,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 6129,
    open_pr_count: 30,
    closed_pr_count: 2869,
    week_issue_change: -18,
    history: [
      30, 4, 6, 28, 17, 30, 30, 20, 7, 26, 17, 4, 6, 3, 21, 24, 27, 30, 6, 5,
    ],
  },
  {
    id: 3214406,
    name: 'meteor',
    full_name: 'meteor/meteor',
    html_url: 'https://github.com/meteor/meteor',
    description: 'Meteor, the JavaScript App Platform',
    created_at: new Date('2012-01-19T01:58:17').toDateString(),
    updated_at: new Date('2021-12-20T06:36:27').toDateString(),
    pushed_at: new Date('2021-12-17T18:10:08').toDateString(),
    homepage: 'https://www.meteor.com',
    github_stars: 42742,
    language: 'JavaScript',
    forks_count: 5187,
    open_issues_count: 120,
    license: 'Other',
    topics: [
      'build-system',
      'framework',
      'hacktoberfest',
      'javascript',
      'meteor',
      'mongodb',
      'nodejs',
      'npm',
      'reactive-programming',
      'zero-configuration',
    ],
    github_watchers: 1642,
    has_projects: true,
    has_wiki: true,
    has_pages: false,
    closed_issues_count: 8537,
    open_pr_count: 24,
    closed_pr_count: 2998,
    week_issue_change: 21,
    history: [29, 30, 28, 20, 1, 24],
  },
  {
    id: 43695474,
    name: 'quasar',
    full_name: 'quasarframework/quasar',
    html_url: 'https://github.com/quasarframework/quasar',
    description:
      'Quasar Framework - Build high-performance VueJS user interfaces in record time',
    created_at: new Date('2015-10-05T15:45:36').toDateString(),
    updated_at: new Date('2021-12-20T08:26:07').toDateString(),
    pushed_at: new Date('2021-12-19T23:18:50').toDateString(),
    homepage: 'https://quasar.dev',
    github_stars: 20095,
    language: 'JavaScript',
    forks_count: 2543,
    open_issues_count: 367,
    license: 'MIT License',
    topics: [
      'android',
      'browser-extension',
      'electron',
      'ios',
      'javascript',
      'material',
      'material-components',
      'material-design',
      'material-theme',
      'pwa',
      'quasar-framework',
      'server-side-rendering',
      'ssr',
      'vue',
      'vue-component',
      'vue-components',
      'vue2',
      'vuejs',
      'vuejs2',
    ],
    github_watchers: 488,
    has_projects: false,
    has_wiki: false,
    has_pages: false,
    closed_issues_count: 6097,
    open_pr_count: 97,
    closed_pr_count: 3424,
    week_issue_change: 1,
    history: [26, 12, 7, 13, 17, 18, 20, 1, 28, 23, 22, 2, 2, 22, 18, 29, 2],
  },
];
```

## Badge UI Options

There are many options available to control the look and feel of the Badge (and the containing Cell).

### Pill Style

Each Badge's pill is styled via the **`PillStyle`** property.

`PillStyle` is optional — when omitted, the Badge displays with default chrome (useful for icon-only Badges)

This is a cut-down subset of [Adaptable Style](https://www.adaptabletools.com/docs/ui-tutorial-providing-adaptable-style/index.md) containing just the properties that are relevant:

- `BackColor` — pill background colour
- `ForeColor` — pill text / icon colour
- `BorderColor` — optional 1px pill border
- `FontWeight` — `'Normal'` or `'Bold'`
- `FontStyle` — `'Normal'` or `'Italic'`
- `TextDecoration` — `'None'`, `'Underline'`, `'Overline'` or `'LineThrough'`

- Corner radius is **not** on `PillStyle` — use the [`Shape`](#shape) token instead
- Pills inherit nothing from a Format Column; Styled Columns own their pill rendering completely

### Shape

Each Badge can declare a `Shape` token instead of reaching for a pixel `BorderRadius`:

- `'Pill'` — fully rounded ends
- `'Rounded'` — subtly rounded corners (~4px)
- `'Square'` — sharp corners

`Shape` is the only way to set corner radius — `PillStyle` does not expose a `BorderRadius` property

```ts
{
  Shape: 'Pill',
  PillStyle: { BackColor: 'var(--ab-color-palette-23)', ForeColor: 'var(--ab-color-palette-14)' },
}
```

### Density

The `Density` property on `BadgeStyle` controls the **inner padding** for _every_ badge in the column.

This ensures that a column reads as one consistent label set:

- `'Compact'` — tight padding for dense grids
- `'Normal'` — balanced (default)
- `'Comfortable'` — looser, for low-density / large-font grids

```ts
{
  ColumnId: 'topics',
  Name: 'Topics Badges',
  BadgeStyle: {
    Density: 'Compact',
    Badges: [/* ... */],
  },
}
```

### Cell Style

The `Cell` property on `BadgeStyle` styles the **chrome of the cell behind the pills** — independently of the pills themselves.

It accepts a `CellBoxStyle` object with the standard cell-box properties:

- `BackColor` — cell background colour
- `BorderColor` — cell border colour
- `BorderRadius` — cell corner radius (in pixels)

- `Cell` is optional — when unset, the cell inherits any matching [Format Column](https://www.adaptabletools.com/docs/handbook-column-formatting-adaptable-style/index.md) Cell-box properties
- When set, `Cell` **claims** the Cell slice: matching Format Column Cell-box properties are stripped so the two cannot fight

**Example: Badge Style: Cell & Alignment**

Cell chrome and centred badge row

- **License** — column-level **`Cell`** (background, border, radius) behind the pills, plus **`Font.Alignment: 'Center'`** for the whole badge row
- Three **`Expression`** rules tint MIT / BSD / other licences — same pill styling idea as the overview demo, isolated here to show v23 column-level options

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Badge Cell chrome and alignment',
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          Name: 'Standard Layout',
          TableColumns: [
            'name',
            'license',
            'language',
            'github_stars',
            'closed_issues_count',
            'open_issues_count',
            'week_issue_change',
            'has_projects',
            'has_pages',
            'updated_at',
            'pushed_at',
          ],
          AutoSizeColumns: true,
          ColumnSizing: {
            license: {Width: 160},
          },
        },
      ],
    },
    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'license',
          Name: 'License cell chrome',
          BadgeStyle: {
            Cell: {
              BackColor: 'rgba(255, 255, 255, 0.06)',
              BorderColor: 'rgba(255, 255, 255, 0.2)',
              BorderRadius: 6,
            },
            Font: {
              Alignment: 'Center',
            },
            Badges: [
              {
                Shape: 'Rounded',
                Rule: '[license] = "MIT License"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-23)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Shape: 'Rounded',
                Rule: '[license] = "BSD 3-Clause"',
                PillStyle: {
                  BackColor: 'SaddleBrown',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Shape: 'Rounded',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-28)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

### Row Alignment

By default the row of Badges in a cell flows from the left of the cell.

The `Font.Alignment` property on `BadgeStyle` positions the entire **badge row** horizontally within the cell:

- `'Left'` _(default)_
- `'Center'`
- `'Right'`

- Only `Alignment` is meaningful on the column-level `Font` for a Badge column
- Other `Font` properties (`ForeColor`, `FontWeight`, etc.) belong on each pill's `PillStyle`, not here
- When set, `Font.Alignment` overrides `Alignment` from any matching [Format Column](https://www.adaptabletools.com/docs/handbook-column-formatting-adaptable-style/index.md)

```ts
{
  ColumnId: 'license',
  Name: 'License Badges',
  BadgeStyle: {
    Font: {
      Alignment: 'Center',
    },
    Badges: [/* ... */],
  },
}
```

## Rules

Which pill is shown for each cell is decided by each badge's optional **Rule**.

A Rule is a (boolean) [Expression](https://www.adaptabletools.com/docs/adaptable-ql-expression/index.md), evaluated using [AdapTableQL](https://www.adaptabletools.com/docs/adaptable-ql-expression/index.md).

AdapTable walks the `Badges` array **top-down** and uses the **first** match it finds.

If a badge has **no** Rule, it matches every cell — put exactly one such badge at the **end** of the array as a fallback (e.g. a default gray pill on an array column).

- Multiple badges per column let you vary `PillStyle`, `Shape` and `Icon` by value
- For instance, you can have a different colour per status or licence type

**Example: Badge Styles: Multiple Rules**

Styling Badges with Multiple Rules

- This example contains a Badge Style on the Country column
- Each country's Badge shows a different style based on a bespoke Rule

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';

export const adaptableOptions: AdaptableOptions = {
  primaryKey: 'EmployeeId',
  adaptableId: 'Badge Style Multiple Rules',
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Basic Layout',
      Layouts: [
        {
          Name: 'Basic Layout',
          TableColumns: [
            'Name',
            'Year',
            'Country',
            'CountryCode',
            'Institutions',
            'Email',
            'Rating',
          ],
        },
      ],
    },
    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'Country',
          Name: 'country Badge',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[Country] = "United States"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-30)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Rule: '[Country] = "United Kingdom"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-24)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Rule: '[Country] = "Italy"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-28)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Rule: '[Country] = "Germany"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-17)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
              {
                Rule: '[Country] = "Japan"',
                PillStyle: {
                  BackColor: 'LightBlue',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
              },
              {
                Rule: '[Country] = "Switzerland"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    headerName: 'Id',
    field: 'EmployeeId',
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Name',
    field: 'Name',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Year',
    field: 'Year',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
  {
    headerName: 'Institutions',
    field: 'Institutions',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'textArray',
  },
  {
    headerName: 'Country',
    field: 'Country',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'CountryCode',
    field: 'CountryCode',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },

  {
    headerName: 'Email',
    field: 'Email',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Rating',
    field: 'Rating',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
];
```

**`src/rowData.ts`**

```ts
export const rowData = [
  {
    EmployeeId: 1,
    Name: 'Giorgio Parisi',
    Year: 2021,
    Institutions: ['Sapienza', ' Columbia'],
    Country: 'Italy',
    CountryCode: 'ITA',
    Email: 'giorgio.parisi@mail.com',
    Rating: 89,
  },
  {
    EmployeeId: 2,
    Name: 'Klaus Hasselman',
    Year: 2021,
    Institutions: ['Hamburg', 'Max Planxk', 'Uni of California'],
    Country: 'Germany',
    CountryCode: 'DEU',
    Email: 'klaus.hasselman@yahoo.com',
    Rating: 74,
  },
  {
    EmployeeId: 3,
    Name: 'Syukor Manabe',
    Year: 2021,
    Institutions: ['Princeton', 'Nagoya'],
    Country: 'Japan',
    CountryCode: 'JPN',

    Email: 'syukor.manabe@outlook.com',
    Rating: 92,
  },
  {
    EmployeeId: 4,
    Name: 'Andrea Ghez',
    Year: 2020,
    Institutions: ['Uni of California'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'andrea.ghez@mail.com',
    Rating: 85,
  },
  {
    EmployeeId: 5,
    Name: 'Reinhard Genzel',
    Year: 2020,
    Institutions: ['Max Planck'],
    Country: 'Germany',
    CountryCode: 'DEU',

    Email: 'reinhard.genzel@mail.com',
    Rating: 68,
  },
  {
    EmployeeId: 6,
    Name: 'Roger Penrose',
    Year: 2020,
    Institutions: ['Columbia', 'Princeton', 'Syracuse'],
    Country: 'United Kingdom',
    CountryCode: 'GBR',

    Email: 'roger.penrose@yahoo.com',
    Rating: 71,
  },
  {
    EmployeeId: 7,
    Name: 'Didier Queloz',
    Year: 2019,
    Institutions: ['University of Cambridge', 'Geneva'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'didier.queloz@mail.com',
    Rating: 87,
  },
  {
    EmployeeId: 8,
    Name: 'Michel Mayor',
    Year: 2019,
    Institutions: ['Geneva', 'Columbia'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'michel.mayor@yahoo.com',
    Rating: 94,
  },
  {
    EmployeeId: 9,
    Name: 'Jim Peebles',
    Year: 2019,
    Institutions: ['Princeton'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'jim.peebles@outlook.com',
    Rating: 66,
  },
];
```

## Icons

Badges can optionally include an Icon for extra decoration in addition to the Style.

They are defined using the `IconProperties` object which nests 4 main Icon-related properties:

| Property   | Description                                                                                                                                                                                                     |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Icon`     | The Icon itself (of type [Adaptable Icon](https://www.adaptabletools.com/docs/ui-tutorial-creating-icon/index.md) and most commonly a [System Icon](https://www.adaptabletools.com/docs/ui-tutorial-creating-icon/index.md#appendix-adaptable-icon-library)) |
| `Position` | `'Start'` (default value) or`'End'`                                                                                                                                                                             |
| `Gap`      | Pixel gap between Icon and Pill text (falls back to column `Density` preset when omitted)                                                                                                                       |
| `IconOnly` | Set to `true` to hide Pill text and show **only** the icon (see [Icon Only Badges](#icon-only-badges))                                                                                                          |

### Icon Placement

The `Position` and `Gap` properties control where the icon sits in the pill and how much breathing room it gets:

```ts {3,4}
IconProperties: {
  Icon: { name: 'alert' },
  Position: 'End',
  Gap: 6,
},
PillStyle: { BackColor: 'var(--ab-color-palette-30)', ForeColor: 'var(--ab-color-palette-14)' },
```

### Custom Icons

Alternatively, the Icon in the Badge can be a **Custom** Icon provided by the developer at design-time.

Custom Icons can be defined "inline" or supplied using the `customIcons` property in [User Interface Options](https://www.adaptabletools.com/docs/technical-reference-ui/index.md).

- The advantages of using the `customIcons` property is that Icons can be re-used (e.g. in Buttons)
- It also allows run-time users to create Badge Styles that use custom icons as they will appear in the icon dropdown

**Example: Badge Styles: Custom Icons**

Showing Custom Icons in Badges

- This example also contains a Badge Style on the Country column
- Each country's Badge includes an icon that was provided in `customIcons` in [User Interface Options](https://www.adaptabletools.com/docs/technical-reference-ui/index.md)

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {truncate} from 'fs/promises';

export const adaptableOptions: AdaptableOptions = {
  primaryKey: 'EmployeeId',
  adaptableId: 'Badge Style Custom Icons',
  userInterfaceOptions: {
    customIcons: [
      {
        name: 'UK',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/1/13/United-kingdom_flag_icon_round.svg',
        },
      },
      {
        name: 'Italy',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg',
        },
      },
      {
        name: 'Germany',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/en/thumb/b/ba/Flag_of_Germany.svg/800px-Flag_of_Germany.svg.png',
        },
      },
      {
        name: 'US',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/8/88/United-states_flag_icon_round.svg',
        },
      },
      {
        name: 'Switzerland',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Switzerland.svg/512px-Flag_of_Switzerland.svg.png',
        },
      },
      {
        name: 'Japan',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/b/bc/Flag_of_Japan%28bordered%29.svg',
        },
      },
    ],
  },
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Basic Layout',
      Layouts: [
        {
          Name: 'Basic Layout',
          TableColumns: [
            'Name',
            'Year',
            'Country',
            'CountryCode',
            'Institutions',
            'Email',
            'Rating',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'Country',
          Name: 'country Badge',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[Country] = "United States"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'US',
                  },
                },
              },
              {
                Rule: '[Country] = "United Kingdom"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'UK',
                  },
                },
              },
              {
                Rule: '[Country] = "Italy"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'Italy',
                  },
                },
              },
              {
                Rule: '[Country] = "Germany"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'Germany',
                  },
                },
              },

              {
                Rule: '[Country] = "Japan"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'Japan',
                  },
                },
              },
              {
                Rule: '[Country] = "Switzerland"',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'Switzerland',
                  },
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    headerName: 'Id',
    field: 'EmployeeId',
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Name',
    field: 'Name',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Year',
    field: 'Year',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
  {
    headerName: 'Institutions',
    field: 'Institutions',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'textArray',
  },
  {
    headerName: 'Country',
    field: 'Country',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Code',
    field: 'CountryCode',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },

  {
    headerName: 'Email',
    field: 'Email',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Rating',
    field: 'Rating',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
];
```

**`src/rowData.ts`**

```ts
export const rowData = [
  {
    EmployeeId: 1,
    Name: 'Giorgio Parisi',
    Year: 2021,
    Institutions: ['Sapienza', ' Columbia'],
    Country: 'Italy',
    CountryCode: 'ITA',
    Email: 'giorgio.parisi@mail.com',
    Rating: 89,
  },
  {
    EmployeeId: 2,
    Name: 'Klaus Hasselman',
    Year: 2021,
    Institutions: ['Hamburg', 'Max Planxk', 'Uni of California'],
    Country: 'Germany',
    CountryCode: 'DEU',
    Email: 'klaus.hasselman@yahoo.com',
    Rating: 74,
  },
  {
    EmployeeId: 3,
    Name: 'Syukor Manabe',
    Year: 2021,
    Institutions: ['Princeton', 'Nagoya'],
    Country: 'Japan',
    CountryCode: 'JPN',

    Email: 'syukor.manabe@outlook.com',
    Rating: 92,
  },
  {
    EmployeeId: 4,
    Name: 'Andrea Ghez',
    Year: 2020,
    Institutions: ['Uni of California'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'andrea.ghez@mail.com',
    Rating: 85,
  },
  {
    EmployeeId: 5,
    Name: 'Reinhard Genzel',
    Year: 2020,
    Institutions: ['Max Planck'],
    Country: 'Germany',
    CountryCode: 'DEU',

    Email: 'reinhard.genzel@mail.com',
    Rating: 68,
  },
  {
    EmployeeId: 6,
    Name: 'Roger Penrose',
    Year: 2020,
    Institutions: ['Columbia', 'Princeton', 'Syracuse'],
    Country: 'United Kingdom',
    CountryCode: 'GBR',

    Email: 'roger.penrose@yahoo.com',
    Rating: 71,
  },
  {
    EmployeeId: 7,
    Name: 'Didier Queloz',
    Year: 2019,
    Institutions: ['University of Cambridge', 'Geneva'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'didier.queloz@mail.com',
    Rating: 87,
  },
  {
    EmployeeId: 8,
    Name: 'Michel Mayor',
    Year: 2019,
    Institutions: ['Geneva', 'Columbia'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'michel.mayor@yahoo.com',
    Rating: 94,
  },
  {
    EmployeeId: 9,
    Name: 'Jim Peebles',
    Year: 2019,
    Institutions: ['Princeton'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'jim.peebles@outlook.com',
    Rating: 66,
  },
];
```

### Icon Only Badges

It is possible to render a Badge where **only the Icon is visible** (without any cell text displayed).

This is done by setting `IconProperties.IconOnly` to `true`.

```ts
{
  IconProperties: {
    Icon: { name: 'star' },
    IconOnly: true,
  },
  PillStyle: { BackColor: 'Gold' },
}
```

For a single, value-mapped glyph (flags, status, currency), use an [Icon Styled Column](https://www.adaptabletools.com/docs/handbook-styled-column-icon/index.md) instead — it includes presets and fallback behaviour.

**Example: Badge Styles: Only Icons**

Showing Only Icons (and no text) in Badges

- This example contains 2 Badge Styles that display the Icon only (and no cell text):
  - `Code` - uses the same set of Custom Icons that we provide in the demo above (and has no style for the Badge applied)
  - `Rating` - uses an AdapTable Icon and does have a style (of gray back colour)

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';

export const adaptableOptions: AdaptableOptions = {
  primaryKey: 'EmployeeId',
  adaptableId: 'Badge Style Only Icons',
  userInterfaceOptions: {
    customIcons: [
      {
        name: 'UK',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/1/13/United-kingdom_flag_icon_round.svg',
        },
      },
      {
        name: 'Italy',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg',
        },
      },
      {
        name: 'Germany',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/en/thumb/b/ba/Flag_of_Germany.svg/800px-Flag_of_Germany.svg.png',
        },
      },
      {
        name: 'US',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/8/88/United-states_flag_icon_round.svg',
        },
      },
      {
        name: 'Switzerland',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Switzerland.svg/512px-Flag_of_Switzerland.svg.png',
        },
      },
      {
        name: 'Japan',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/b/bc/Flag_of_Japan%28bordered%29.svg',
        },
      },
    ],
  },
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Basic Layout',
      Layouts: [
        {
          Name: 'Basic Layout',
          TableColumns: [
            'Name',
            'Year',
            'CountryCode',
            'Institutions',
            'Country',
            'Rating',
            'Email',
          ],
          AutoSizeColumns: true,
        },
      ],
    },
    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'CountryCode',
          Name: 'countryCode Badge',
          BadgeStyle: {
            Badges: [
              {
                Rule: '[CountryCode] = "USA"',
                IconProperties: {
                  Icon: {
                    name: 'US',
                  },
                  IconOnly: true,
                },
              },
              {
                Rule: '[CountryCode] = "GBR"',
                IconProperties: {
                  Icon: {
                    name: 'UK',
                  },
                  IconOnly: true,
                },
              },
              {
                Rule: '[CountryCode] = "ITA"',
                IconProperties: {
                  Icon: {
                    name: 'Italy',
                  },
                  IconOnly: true,
                },
              },
              {
                Rule: '[CountryCode] = "DEU"',
                IconProperties: {
                  Icon: {
                    name: 'Germany',
                  },
                  IconOnly: true,
                },
              },

              {
                Rule: '[CountryCode] = "JPN"',
                IconProperties: {
                  Icon: {
                    name: 'Japan',
                  },
                  IconOnly: true,
                },
              },
              {
                Rule: '[CountryCode] = "CHE"',
                IconProperties: {
                  Icon: {
                    name: 'Switzerland',
                  },
                  IconOnly: true,
                },
              },
            ],
          },
        },
        {
          ColumnId: 'Rating',
          Name: 'rating Badge',
          BadgeStyle: { 
            Badges: [
              {
                Rule: '[Rating] > 90',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'check',
                  },
                  IconOnly: true,
                },
              },
              {
                Rule: '[Rating] >= 75 AND [Rating] <= 89',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                IconProperties: {
                  Icon: {
                    name: 'dock',
                  },
                  IconOnly: true,
                },
              },
              {
                Rule: '[Rating] < 75',
                IconProperties: {
                  Icon: {
                    name: 'close',
                  },
                  IconOnly: true,
                },
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    headerName: 'Id',
    field: 'EmployeeId',
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Name',
    field: 'Name',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Year',
    field: 'Year',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
  {
    headerName: 'Institutions',
    field: 'Institutions',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'textArray',
  },
  {
    headerName: 'Country',
    field: 'Country',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Code',
    field: 'CountryCode',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },

  {
    headerName: 'Email',
    field: 'Email',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Rating',
    field: 'Rating',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
];
```

**`src/rowData.ts`**

```ts
export const rowData = [
  {
    EmployeeId: 1,
    Name: 'Giorgio Parisi',
    Year: 2021,
    Institutions: ['Sapienza', ' Columbia'],
    Country: 'Italy',
    CountryCode: 'ITA',
    Email: 'giorgio.parisi@mail.com',
    Rating: 89,
  },
  {
    EmployeeId: 2,
    Name: 'Klaus Hasselman',
    Year: 2021,
    Institutions: ['Hamburg', 'Max Planxk', 'Uni of California'],
    Country: 'Germany',
    CountryCode: 'DEU',
    Email: 'klaus.hasselman@yahoo.com',
    Rating: 74,
  },
  {
    EmployeeId: 3,
    Name: 'Syukor Manabe',
    Year: 2021,
    Institutions: ['Princeton', 'Nagoya'],
    Country: 'Japan',
    CountryCode: 'JPN',

    Email: 'syukor.manabe@outlook.com',
    Rating: 92,
  },
  {
    EmployeeId: 4,
    Name: 'Andrea Ghez',
    Year: 2020,
    Institutions: ['Uni of California'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'andrea.ghez@mail.com',
    Rating: 85,
  },
  {
    EmployeeId: 5,
    Name: 'Reinhard Genzel',
    Year: 2020,
    Institutions: ['Max Planck'],
    Country: 'Germany',
    CountryCode: 'DEU',

    Email: 'reinhard.genzel@mail.com',
    Rating: 68,
  },
  {
    EmployeeId: 6,
    Name: 'Roger Penrose',
    Year: 2020,
    Institutions: ['Columbia', 'Princeton', 'Syracuse'],
    Country: 'United Kingdom',
    CountryCode: 'GBR',

    Email: 'roger.penrose@yahoo.com',
    Rating: 71,
  },
  {
    EmployeeId: 7,
    Name: 'Didier Queloz',
    Year: 2019,
    Institutions: ['University of Cambridge', 'Geneva'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'didier.queloz@mail.com',
    Rating: 87,
  },
  {
    EmployeeId: 8,
    Name: 'Michel Mayor',
    Year: 2019,
    Institutions: ['Geneva', 'Columbia'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'michel.mayor@yahoo.com',
    Rating: 94,
  },
  {
    EmployeeId: 9,
    Name: 'Jim Peebles',
    Year: 2019,
    Institutions: ['Princeton'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'jim.peebles@outlook.com',
    Rating: 66,
  },
];
```

## Arrays

Badges can be applied to multiple items in the same cell.

The Column definition needs to have a [Cell Data Type](https://www.adaptabletools.com/docs/dev-guide-aggrid-cell-data-types/index.md) of `textArray` or `numberArray`

By default AdapTable will apply **the same Badge style** to every item in the Array.

However users can create multiple Badges for an Array column, with each having its own Rule and Style.

There is no limit for the number of Badges which an array-based Column can contain

**Example: Badge Styles: Arrays**

Badge Styles in Array Columns

- This example applies a Badge Style to 2 array-based Columns:
  - `Institutions` column (string) - we created 7 Badges each with a Rule (per institution), and a (Green) Badge for institutions which do not meet any Rule
  - `Awards` column (numeric) - a single Badge Style for all values (and no Rules)

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template, with charts]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts
  styles.css           [template]
index.html             [template]
package.json           [template] + ag-charts-enterprise
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';

export const adaptableOptions: AdaptableOptions = {
  primaryKey: 'EmployeeId',
  adaptableId: 'Badge Style Arrays',
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Basic Layout',
      Layouts: [
        {
          Name: 'Basic Layout',
          TableColumns: [
            'Name',
            'Year',
            'Country',
            'CountryCode',
            'Institutions',
            'Email',
            'Awards',
          ],
          ColumnSizing: {
            Name: {Width: 130},
            Year: {Width: 80},
            Country: {Width: 150},
            CountryCode: {Width: 120},
            Institutions: {Width: 300},
            Email: {Width: 150},
            Awards: {Width: 300},
          },
        },
      ],
    },
    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'Institutions',
          Name: 'institutions Badge',
          BadgeStyle: {
            Density: 'Compact',
            Spacing: 4,
            OverflowMode: 'Wrap',
            Badges: [
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'LightGreen',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: '[Institutions] = "Columbia"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-28)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
                Rule: '[Institutions] = "Princeton"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-17)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
                Rule: '[Institutions] = "Max Planck"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-32)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: '[Institutions] = "Geneva"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'LightBlue',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: '[Institutions] = "University of Cambridge"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-23)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
                Rule: '[Institutions] = "Oxford University"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'Pink',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: '[Institutions] = "Hamburg"',
              },
              {
                Shape: 'Pill',
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-18)',
                  ForeColor: 'var(--ab-color-palette-14)',
                },
              },
            ],
          },
        },
        {
          ColumnId: 'Awards',
          Name: 'awards Badge',
          BadgeStyle: {
            Badges: [
              {
                PillStyle: {
                  BackColor: 'var(--ab-color-palette-15)',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    headerName: 'Id',
    field: 'EmployeeId',
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Name',
    field: 'Name',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Year',
    field: 'Year',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
  {
    headerName: 'Institutions',
    field: 'Institutions',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'textArray',
    autoHeight: true,
  },
  {
    headerName: 'Country',
    field: 'Country',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'CountryCode',
    field: 'CountryCode',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },

  {
    headerName: 'Email',
    field: 'Email',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Awards',
    field: 'Awards',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'numberArray',
  },
];
```

**`src/rowData.ts`**

```ts
export const rowData = [
  {
    EmployeeId: 1,
    Name: 'Giorgio Parisi',
    Year: 2021,
    Institutions: ['Sapienza', 'Columbia'],
    Country: 'Italy',
    CountryCode: 'ITA',
    Email: 'giorgio.parisi@mail.com',
    Awards: [2012, 2017, 2022],
  },
  {
    EmployeeId: 2,
    Name: 'Klaus Hasselman',
    Year: 2021,
    Institutions: ['Hamburg', 'Max Planck'],
    Country: 'Germany',
    CountryCode: 'DEU',
    Email: 'klaus.hasselman@yahoo.com',
    Awards: [2015, 2023],
  },
  {
    EmployeeId: 3,
    Name: 'Syukor Manabe',
    Year: 2021,
    Institutions: ['Princeton', 'Nagoya'],
    Country: 'Japan',
    CountryCode: 'JPN',

    Email: 'syukor.manabe@outlook.com',
    Awards: [2010, 2019, 2024],
  },
  {
    EmployeeId: 4,
    Name: 'Andrea Ghez',
    Year: 2020,
    Institutions: ['University of Cambridge'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'andrea.ghez@mail.com',
    Awards: [2013, 2017, 2020, 2023],
  },
  {
    EmployeeId: 5,
    Name: 'Reinhard Genzel',
    Year: 2020,
    Institutions: ['Max Planck', 'Oxford University'],
    Country: 'Germany',
    CountryCode: 'DEU',

    Email: 'reinhard.genzel@mail.com',
    Awards: [2019],
  },
  {
    EmployeeId: 6,
    Name: 'Roger Penrose',
    Year: 2020,
    Institutions: ['Columbia', 'Princeton', 'Syracuse'],
    Country: 'United Kingdom',
    CountryCode: 'GBR',

    Email: 'roger.penrose@yahoo.com',
    Awards: [2014, 2015, 2025],
  },
  {
    EmployeeId: 7,
    Name: 'Didier Queloz',
    Year: 2019,
    Institutions: ['University of Cambridge', 'Geneva'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'didier.queloz@mail.com',
    Awards: [2015, 2016, 2022],
  },
  {
    EmployeeId: 8,
    Name: 'Michel Mayor',
    Year: 2019,
    Institutions: ['Geneva', 'Columbia'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'michel.mayor@yahoo.com',
    Awards: [2012, 2013],
  },
  {
    EmployeeId: 9,
    Name: 'Jim Peebles',
    Year: 2019,
    Institutions: ['Oxford University', 'Princeton'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'jim.peebles@outlook.com',
    Awards: [2015, 2017, 2021, 2022, 2023],
  },
];
```

### Spacing & Overflow

When rendering multiple badges side-by-side, two further options are available:

- `Spacing` _(number, px — default `4`)_ — sets the gap between adjacent badges
- `OverflowMode` _(default `'Truncate'`)_ — how badges lay out when the cell is too narrow:
  - `'Truncate'` — single line; cell clips overflow (legacy behaviour)
  - `'Wrap'` — wrap onto subsequent lines (works best with `autoRowHeight` or a tall `rowHeight`)
  - `'Scroll'` — single line; the cell becomes horizontally scrollable

```ts
{
  ColumnId: 'topics',
  Name: 'Topics Badges',
  BadgeStyle: {
    Density: 'Compact',
    Spacing: 4,
    OverflowMode: 'Wrap',
    Badges: [/* ... */],
  },
}
```

### Custom Functions

When many values map to a single group, wrap the lookup in a reusable [Custom Function](https://www.adaptabletools.com/docs/adaptable-ql-expression-functions-custom-standard/index.md) and call it from the badge's **Rule** `Expression`.

- This is very useful if there are many different cell values and a lookup function is required
- It is also useful in Array Columns where you wish to group similar values together
- The same function can be reused anywhere AdapTableQL runs (Alerts, Format Columns, Filters etc.)

**Example: Badge Styles: Custom Functions**

Badge Styles using Custom Functions

- This example applies a Badge to the `Institutions` column (similar to the demo above)
- We register 4 [Custom Functions](https://www.adaptabletools.com/docs/adaptable-ql-expression-functions-custom-standard/index.md) — `IS_IVY_LEAGUE`, `IS_OXBRIDGE`, `IS_EUROPEAN` and `IS_JAPANESE` — each grouping several institutions
- We then create 4 Badges — one per function — which displays an appropriate flag

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions, ExpressionContext} from '@adaptabletools/adaptable';

// Membership lists behind each reusable custom function
const IVY_LEAGUE = ['Columbia', 'Princeton', 'Syracuse'];
const OXBRIDGE = ['University of Cambridge', 'Oxford University'];
const EUROPEAN = ['Hamburg', 'Max Planck', 'Geneva', 'Sapienza'];
const JAPANESE = ['Nagoya'];

export const adaptableOptions: AdaptableOptions = {
  primaryKey: 'EmployeeId',
  adaptableId: 'Badge Style Custom Functions',
  expressionOptions: {
    // Reusable, named grouping functions - usable anywhere AdapTableQL runs
    // (Badges, Alerts, Format Columns, Filters, Calculated Columns...)
    customStandardFunctions: {
      IS_IVY_LEAGUE: {
        handler(args: any[], _context: ExpressionContext) {
          return IVY_LEAGUE.includes(args[0]);
        },
        returnType: 'boolean',
        description: 'Returns true if the institution is in the Ivy League',
        signatures: ['IS_IVY_LEAGUE(institution: string)'],
        examples: ['IS_IVY_LEAGUE([Institutions])'],
        category: 'Custom',
      },
      IS_OXBRIDGE: {
        handler(args: any[], _context: ExpressionContext) {
          return OXBRIDGE.includes(args[0]);
        },
        returnType: 'boolean',
        description: 'Returns true if the institution is Oxford or Cambridge',
        signatures: ['IS_OXBRIDGE(institution: string)'],
        examples: ['IS_OXBRIDGE([Institutions])'],
        category: 'Custom',
      },
      IS_EUROPEAN: {
        handler(args: any[], _context: ExpressionContext) {
          return EUROPEAN.includes(args[0]);
        },
        returnType: 'boolean',
        description: 'Returns true if the institution is a mainland European institution',
        signatures: ['IS_EUROPEAN(institution: string)'],
        examples: ['IS_EUROPEAN([Institutions])'],
        category: 'Custom',
      },
      IS_JAPANESE: {
        handler(args: any[], _context: ExpressionContext) {
          return JAPANESE.includes(args[0]);
        },
        returnType: 'boolean',
        description: 'Returns true if the institution is a Japanese institution',
        signatures: ['IS_JAPANESE(institution: string)'],
        examples: ['IS_JAPANESE([Institutions])'],
        category: 'Custom',
      },
    },
  },
  userInterfaceOptions: {
    customIcons: [
      {
        name: 'UK',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/1/13/United-kingdom_flag_icon_round.svg',
        },
      },
      {
        name: 'US',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/8/88/United-states_flag_icon_round.svg',
        },
      },
      {
        name: 'EUR',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/b/b7/Flag_of_Europe.svg',
        },
      },
      {
        name: 'Japan',
        icon: {
          src: 'https://upload.wikimedia.org/wikipedia/commons/b/bc/Flag_of_Japan%28bordered%29.svg',
        },
      },
    ],
  },
  initialState: {
    Dashboard: {
      ModuleButtons: ['StyledColumn'],
    },
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Basic Layout',
      Layouts: [
        {
          Name: 'Basic Layout',
          TableColumns: [
            'Name',
            'Year',
            'Country',
            'CountryCode',
            'Institutions',
            'Email',
            'Rating',
          ],
          ColumnSizing: {
            Name: {Width: 130},
            Year: {Width: 80},
            Country: {Width: 150},
            CountryCode: {Width: 120},
            Institutions: {Width: 300},
            Email: {Width: 150},
            Rating: {Width: 100},
          },
        },
      ],
    },
    StyledColumn: {
      StyledColumns: [
        {
          ColumnId: 'Institutions',
          Name: 'institutions Badge',
          BadgeStyle: {
            Badges: [
              {
                PillStyle: {
                  BackColor: 'LightGreen',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: 'IS_IVY_LEAGUE([Institutions])',
                IconProperties: {
                  Icon: {
                    name: 'US',
                  },
                },
              },
              {
                PillStyle: {
                  BackColor: 'LightBlue',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: 'IS_OXBRIDGE([Institutions])',
                IconProperties: {
                  Icon: {
                    name: 'UK',
                  },
                },
              },
              {
                PillStyle: {
                  BackColor: 'SandyBrown',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: 'IS_EUROPEAN([Institutions])',
                IconProperties: {
                  Icon: {
                    name: 'EUR',
                  },
                },
              },
              {
                PillStyle: {
                  BackColor: 'Plum',
                  ForeColor: 'var(--ab-color-palette-13)',
                },
                Rule: 'IS_JAPANESE([Institutions])',
                IconProperties: {
                  Icon: {
                    name: 'Japan',
                  },
                },
              },
            ],
          },
        },
      ],
    },
  },
};
```

**`src/columnDefs.ts`**

```ts
import {ColDef} from 'ag-grid-enterprise';

export const columnDefs: ColDef[] = [
  {
    headerName: 'Id',
    field: 'EmployeeId',
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Name',
    field: 'Name',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Year',
    field: 'Year',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
  {
    headerName: 'Institutions',
    field: 'Institutions',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'textArray',
  },
  {
    headerName: 'Country',
    field: 'Country',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'CountryCode',
    field: 'CountryCode',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },

  {
    headerName: 'Email',
    field: 'Email',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'text',
  },
  {
    headerName: 'Rating',
    field: 'Rating',
    filter: true,
    editable: false,
    sortable: true,
    cellDataType: 'number',
  },
];
```

**`src/rowData.ts`**

```ts
export const rowData = [
  {
    EmployeeId: 1,
    Name: 'Giorgio Parisi',
    Year: 2021,
    Institutions: ['Sapienza', 'Columbia'],
    Country: 'Italy',
    CountryCode: 'ITA',
    Email: 'giorgio.parisi@mail.com',
    Rating: 89,
  },
  {
    EmployeeId: 2,
    Name: 'Klaus Hasselman',
    Year: 2021,
    Institutions: ['Hamburg', 'Max Planck'],
    Country: 'Germany',
    CountryCode: 'DEU',
    Email: 'klaus.hasselman@yahoo.com',
    Rating: 74,
  },
  {
    EmployeeId: 3,
    Name: 'Syukor Manabe',
    Year: 2021,
    Institutions: ['Princeton', 'Nagoya'],
    Country: 'Japan',
    CountryCode: 'JPN',

    Email: 'syukor.manabe@outlook.com',
    Rating: 92,
  },
  {
    EmployeeId: 4,
    Name: 'Andrea Ghez',
    Year: 2020,
    Institutions: ['University of Cambridge'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'andrea.ghez@mail.com',
    Rating: 85,
  },
  {
    EmployeeId: 5,
    Name: 'Reinhard Genzel',
    Year: 2020,
    Institutions: ['Max Planck', 'Oxford University'],
    Country: 'Germany',
    CountryCode: 'DEU',

    Email: 'reinhard.genzel@mail.com',
    Rating: 68,
  },
  {
    EmployeeId: 6,
    Name: 'Roger Penrose',
    Year: 2020,
    Institutions: ['Columbia', 'Princeton', 'Syracuse'],
    Country: 'United Kingdom',
    CountryCode: 'GBR',

    Email: 'roger.penrose@yahoo.com',
    Rating: 71,
  },
  {
    EmployeeId: 7,
    Name: 'Didier Queloz',
    Year: 2019,
    Institutions: ['University of Cambridge', 'Geneva'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'didier.queloz@mail.com',
    Rating: 87,
  },
  {
    EmployeeId: 8,
    Name: 'Michel Mayor',
    Year: 2019,
    Institutions: ['Geneva', 'Columbia'],
    Country: 'Switzerland',
    CountryCode: 'CHE',

    Email: 'michel.mayor@yahoo.com',
    Rating: 94,
  },
  {
    EmployeeId: 9,
    Name: 'Jim Peebles',
    Year: 2019,
    Institutions: ['Oxford University', 'Princeton'],
    Country: 'United States',
    CountryCode: 'USA',

    Email: 'jim.peebles@outlook.com',
    Rating: 66,
  },
];
```

## Defining Badge Styles

Badge Styles are provided at design-time through Styled Column Initial Adaptable State.

### Providing a Badge Style in Styled Column State

Supply 3 mandatory properties:

- `ColumnId` — Id of Column on which the Badge Style should render
- `Name` — a unique name for the Styled Column
- `BadgeStyle` object — wrapper containing Badge configuration

The `BadgeStyle` object accepts several column-wide options that apply to **every** badge in the column:

- **`Density`** — inner padding: `'Compact'`, `'Normal'`, `'Comfortable'`
- **`OverflowMode`** _(array columns)_ — how badges lay out when a cell is too narrow: `'Truncate'` _(default)_, `'Wrap'` or `'Scroll'`
- **`Cell`** — `CellBoxStyle` (background, border, radius) drawn behind the pills
- **`Font.Alignment`** — positions the **badge row** (`Left` / `Center` / `Right`) within the cell; overrides any matching Format Column alignment
- **`Spacing`** _(array columns)_ — pixel gap between adjacent Badges

The `Badges` array contains each distinctly styled Badge in the Column.

Each Badge has its own optional Rule, Shape, Pill Style and Icon.

Badges are evaluated **top-down** — first matching Badge in array wins

Each badge can include an optional **`Rule`** (a boolean **`Expression`**). If omitted, the badge matches every cell (use once, as the last entry, for a fallback pill).

Use the **`Shape`** token to control the pill's corner radius:

- `'Pill'` — fully rounded ends
- `'Rounded'` _(default)_ — subtly rounded corners (~4px)
- `'Square'` — sharp corners

`Shape` is **only** way to set corner radius (not available in `PillStyle`)

Use **`PillStyle`** for the pill's visual properties (subset of [Adaptable Style](https://www.adaptabletools.com/docs/ui-tutorial-providing-adaptable-style/index.md)):

- Pills don't inherit from Format Column
- Pill font size is controlled by column `Density`, not `PillStyle`

Display an icon inside the pill via the **`IconProperties`** group:

- **`IconProperties.Icon`** _(required when the group is present)_ — an [Adaptable Icon](https://www.adaptabletools.com/docs/ui-tutorial-creating-icon/index.md). Either an AdapTable System icon (e.g. `{ name: 'alert' }`) or a Custom icon provided inline or via [customIcons](https://www.adaptabletools.com/docs/technical-reference-ui/index.md)
- **`IconProperties.Position`** — `'Start'` _(default)_ or `'End'`
- **`IconProperties.Gap`** — pixel gap between the icon and the pill text (falls back to the column `Density` preset when omitted)
- **`IconProperties.IconOnly`** — `true` to hide the cell text and show **only** the icon

```ts js [[1, 5, "ColumnId"],[1, 6, "Name"],[1, 7, "BadgeStyle"],[2, 8, "Density"],[3, 9, "Badges"],[4, 11, "Rule"],[4, 25, "Rule"],[5, 12, "Shape: 'Pill'"],[5, 19, "PillStyle"],[5, 26, "Shape: 'Rounded'"],[5, 32, "PillStyle"],[5, 38, "Shape: 'Square'"],[5, 44, "PillStyle"],[6, 13, "IconProperties"],[6, 27, "IconProperties"],[6, 39, "IconProperties"]]
const initialState: InitialState = {
  StyledColumn: {
    StyledColumns: [
      {
        ColumnId: 'closed_issues_count',
        Name: 'Closed Issues Badges',
        BadgeStyle: {
          Density: 'Compact',
          Badges: [
            {
              Rule: '[closed_issues_count] < 1000',
              Shape: 'Pill',
              IconProperties: {
                Icon: {
                  name: 'alert',
                },
                Position: 'Start',
              },
              PillStyle: {
                BackColor: 'var(--ab-color-palette-30)',
                ForeColor: 'var(--ab-color-palette-14)',
              },
            },
            {
              Rule: '[closed_issues_count] < 10000',
              Shape: 'Rounded',
              IconProperties: {
                Icon: {
                  name: 'flag',
                },
              },
              PillStyle: {
                BackColor: 'var(--ab-color-palette-32)',
                ForeColor: 'var(--ab-color-palette-14)',
              },
            },
            {
              Shape: 'Square',
              IconProperties: {
                Icon: {
                  name: 'checked',
                },
              },
              PillStyle: {
                BackColor: 'var(--ab-color-palette-19)',
                ForeColor: 'var(--ab-color-palette-14)',
              },
            },
          ],
        },
      },
    ],
  },
};
```

## Creating Badge Styles

Badge Styles can be created at run-time using the Styled Column UI Wizard.

### Creating a Badge Style using the Styled Column Wizard

The Wizard guides you through the following steps:

In the **Settings** step:

- Enter a **Name** for the Styled Column (must be unique within the Grid)
- Pick **Badge Column** from the list of Styled Column Types

The **Scope** step is shared by every Styled Column. Use it to:

- Pick the **Column** to decorate — **Numeric**, **String** and **array** columns are available (columns that already have a Styled Column are not listed).
- Choose which **row kinds** the Badges render on: `Data`, `Group`, `Summary` and `Total` (all are turned on by default, so uncheck the ones you want to exclude)

The **Badges** step is where each pill is defined.

Use **Add Badge** to append another definition; each badge appears in its own expandable card.

For **each** badge you can configure:

- **Shape** — `Pill`, `Rounded` or `Square` (see [Shape](#shape)).
- **Style** — compact editors for the pill’s `PillStyle`
- **Rule** _(optional)_ — an **Expression** that must pass for this badge to render for a cell. Leave no rule on **at most one** badge so it acts as a fallback; badges are evaluated **top-down**, first match wins.
- **Icon** _(optional)_ — pick a system icon, then set **Icon Position**, **Icon Gap**, and **Show Icon Only** — all stored together under `IconProperties`.

AdapTable provides a **Preview** — live pill using the current Shape, Style Icon and density.

You must define **at least one** badge, and **only one** badge may have **no** Rule

The **Style** step applies to the **whole column** (every pill) and includes:

- **Cell Density** — inner padding in cells that contain badges

- **Inter-badge spacing** — optional pixel gap between adjacent pills in same cell (used in Arrays).

- **Overflow mode** — how multiple pills behave when space is tight (also used in Arrays).

- **Alignment** for the **badge row** within the cell

- **Cell chrome** (background, border, radius, etc.) applied behind the pills (override [Format Columns](https://www.adaptabletools.com/docs/handbook-column-formatting-adaptable-style/index.md))

Two further wizard steps — **Tags** (when the workspace has tags enabled) and **Summary** (a read-only review of every previous step) — are shared by all AdapTable modules and not specific to Badge Styles.

  

  ### FAQ

**Can we create multiple Badge Styles?**
Yes, you can have as many per column as required; each should have its own, non-overlapping, Expression-based Rule.

**Can I have differently styled Badges on the same array cell?**
Yes — Badges on array columns (`textArray` / `numberArray`) work the same way as on scalar columns: each `BadgeStyleDefinition` has its own `PillStyle`, `Shape`, `Icon` and Rule, and AdapTable picks the first matching Badge per array element.

**Do you support Badges on Date Columns?**
Not currently, but we might add this in a future version if there is demand
