Skip to content

Search

Start typing to search.


Show all pages

Documentation

data

Table

Rows and columns of data, such as lessons or invoices, that scroll sideways when wide.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

Put a native <table> inside ca-table. Align numbers to the end with Tailwind's text-end and tabular-nums.

Lessons this week
Student Day Time Minutes
Sam de Vries Tuesday 09:00 90
Noor Bakker Wednesday 14:30 60
Lucas Jansen Friday 11:00 120
HTML

Examples

Guidance and accessibility

When to use

  • Use a table for data people compare across rows and columns.
  • For a list of items with one or two details each, a list of cards reads better on small screens.

Accessibility

  • Name the table with a <caption>, and give header cells scope="col" or scope="row".
  • When the table can scroll sideways, give ca-table tabindex="0", role="region" and aria-labelledby pointing at the caption, so keyboard users can scroll it and screen readers announce it.
  • Keep numbers in columns aligned to the end so digits line up.

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the table component
ClassKindUse it for
ca-tableComponentScroll container that styles the <table> inside it.
ca-table__captionPartThe <caption> that names the table.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Lessons this week
Student Day Time Minutes
Sam de Vries Tuesday 09:00 90
Noor Bakker Wednesday 14:30 60
Lucas Jansen Friday 11:00 120

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Lessons this week
Student Day Time Minutes
Sam de Vries Tuesday 09:00 90
Noor Bakker Wednesday 14:30 60
Lucas Jansen Friday 11:00 120

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

Lessons this week
Student Day Time Minutes
Sam de Vries Tuesday 09:00 90
Noor Bakker Wednesday 14:30 60
Lucas Jansen Friday 11:00 120

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Lessons this week
Student Day Time Minutes
Sam de Vries Tuesday 09:00 90
Noor Bakker Wednesday 14:30 60
Lucas Jansen Friday 11:00 120

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />