Table Sizes

Sizes

There are three sizes available for the table component: sm, md, and lg. The default size is md.

Username Account Status Country Last Visited Role Avg Session Duration
john_pond1 active US 02 Sep 2025 07:21:43 PDT user 12
anne.m15 suspended US 02 Oct 2025 08:52:36 PDT user 35
joe_dirte pending US 19 Mar 2025 04:55:19 PDT admin 0
Username Account Status Country Last Visited Role Avg Session Duration
john_pond1 active US 02 Sep 2025 07:21:43 PDT user 12
anne.m15 suspended US 02 Oct 2025 08:52:36 PDT user 35
joe_dirte pending US 19 Mar 2025 04:55:19 PDT admin 0
Username Account Status Country Last Visited Role Avg Session Duration
john_pond1 active US 02 Sep 2025 07:21:43 PDT user 12
anne.m15 suspended US 02 Oct 2025 08:52:36 PDT user 35
joe_dirte pending US 19 Mar 2025 04:55:19 PDT admin 0
import {Component} from "@angular/core"

import {createAngularTable, TableModule} from "@qualcomm-ui/angular/table"
import {getCoreRowModel} from "@qualcomm-ui/core/table"
import type {QdsTableSize} from "@qualcomm-ui/qds-core/table"

import {userColumns, userData} from "./data"

@Component({
  imports: [TableModule],
  selector: "table-size-demo",
  template: `
    <div class="flex w-full flex-col gap-8">
      @for (size of sizes; track size) {
        <div q-table-root [size]="size">
          <div q-table-scroll-container>
            <table q-table-table>
              <thead q-table-header>
                @for (
                  headerGroup of table.getHeaderGroups();
                  track headerGroup.id
                ) {
                  <tr q-table-row>
                    @for (header of headerGroup.headers; track header.id) {
                      <th q-table-header-cell>
                        <ng-container *renderHeader="header; let value">
                          {{ value }}
                        </ng-container>
                      </th>
                    }
                  </tr>
                }
              </thead>
              <tbody q-table-body>
                @for (row of table.getRowModel().rows; track row.id) {
                  <tr q-table-row>
                    @for (cell of row.getVisibleCells(); track cell.id) {
                      <td q-table-cell>
                        <ng-container *renderCell="cell; let value">
                          {{ value }}
                        </ng-container>
                      </td>
                    }
                  </tr>
                }
              </tbody>
            </table>
          </div>
        </div>
      }
    </div>
  `,
})
export class TableSizeDemo {
  sizes: QdsTableSize[] = ["sm", "md", "lg"]

  protected readonly table = createAngularTable(() => ({
    columns: userColumns,
    data: userData,
    getCoreRowModel: getCoreRowModel(),
  }))
}
Last updated on by Ryan Bower