Theme matrix
The same composition in Cobalt, Ember and Moss, each in light and dark, using scoped data-theme and data-brand.
Every cell below sets data-theme and data-brand on its own wrapper, so six themes render side by side on one page. The components inside only use semantic tokens, which is why the same markup works in every cell. This page is also the visual test for all three brands in both themes.
Cobalt, light
Ada Lovelace
ada@example.com
Cobalt, dark
Ada Lovelace
ada@example.com
Ember, light
Ada Lovelace
ada@example.com
Ember, dark
Ada Lovelace
ada@example.com
Moss, light
Ada Lovelace
ada@example.com
Moss, dark
Ada Lovelace
ada@example.com
import {
Avatar,
Badge,
Button,
Card,
CardBody,
CardFooter,
CardHeader,
Checkbox,
Input,
Switch,
} from "@aloxe/react";
const brands = ["cobalt", "ember", "moss"] as const;
const themes = ["light", "dark"] as const;
/** One small settings card, the same in every cell. */
function Composition() {
return (
<Card className="w-full">
<CardHeader>
<div className="flex items-center gap-3">
<Avatar name="Ada Lovelace" />
<div className="flex min-w-0 flex-1 flex-col">
<h3 className="aloxe-text-label-md">Ada Lovelace</h3>
<p className="aloxe-text-caption text-ax-text-muted">ada@example.com</p>
</div>
<Badge tone="accent">Admin</Badge>
</div>
</CardHeader>
<CardBody className="flex flex-col gap-4">
<Input label="Display name" defaultValue="Ada" />
<Switch label="Weekly summary" defaultChecked />
<Checkbox label="Mentions only" />
</CardBody>
<CardFooter className="justify-end">
<Button variant="ghost" size="sm">
Cancel
</Button>
<Button size="sm">Save</Button>
</CardFooter>
</Card>
);
}
export default function ThemeMatrix() {
return (
<div className="@container w-full">
<div className="grid gap-4 @xl:grid-cols-2">
{brands.flatMap((brand) =>
themes.map((theme) => (
<section
key={`${brand}-${theme}`}
data-theme={theme}
data-brand={brand}
aria-label={`${brand}, ${theme}`}
className="flex flex-col gap-3 rounded-ax-lg border border-ax-border-subtle bg-ax-canvas p-4 text-ax-text"
>
<p className="aloxe-text-label-sm text-ax-text-secondary">
{brand.charAt(0).toUpperCase() + brand.slice(1)}, {theme}
</p>
<Composition />
</section>
)),
)}
</div>
</div>
);
}How the cells are themed
Each cell is a wrapper with both attributes:
<section data-theme="dark" data-brand="ember">
<!-- components inside use Ember, dark -->
</section>Both attributes go on the same element. A wrapper that sets only one of them keeps the semantic tokens resolved by its ancestor; see Theming.
What to look for
- The accent (the primary button, the switch, the badge) changes with the brand. Neutrals, type, spacing and radius don't.
- Dark cells change surfaces and text, and the accent shifts to a lighter step of the brand ramp to keep contrast.
- Popups such as the Select list and tooltips copy the scope of the place they open from, so they match their cell.
Brands
Cobalt is in the free @aloxe/tokens package. Ember and Moss are part of Pro and ship as separate CSS files. They are loaded on this site so you can compare them.