A screenshot of the TAC theme in darkmode

This project is not covered by Drupal’s security advisory policy.

TAC is a base theme for Drupal 11 and 12, built entirely from Single Directory Components.

TAC stands for Tag, Attributes, Classes, the order in which it styles things.

TAC Methodology

  • Tag: use native HTML first, so prefer <button>, <details>, <dialog> etc.
  • Attributes: variants and states are attributes in the HTML, like <tac-alert alert-level="warning">
  • Classes: are only used as the last resort.

As an example, a typical theme might write an alert like this:

<div class="alert alert--warning alert--dismissible js-alert">

TAC is able to simplify it to:

<tac-alert alert-level="warning">

It uses plain CSS in cascade layers, design tokens for every value, and has no build step.

Features

  • 35 stable components, including accordion, alert, breadcrumb, button, card, carousel, drawer, hero, mega menu, off-canvas menu, pagination, stat, steps, tabs and video. Every component works in Twig templates and in Drupal Canvas.
  • A starter kit that generates a ready-to-use sub-theme with one command.
  • Theme settings site builders can use without code: colour palettes or custom colours (with live WCAG AA contrast checks), spacing density, corner roundness and typography.
  • Light and dark mode built in, with every colour defined as a light and dark pair.
  • Accessibility by default: every component story is audited automatically with axe, keyboard, reduced motion, 320px reflow and forced colours checks.
  • No build step: no Sass, no bundler and no Node at runtime. Edit a .css file, clear the cache, reload.
  • A documented public API with semantic versioning and a deprecation policy.
  • Phosphor icons and the Geist font family included.

Getting started

  1. Install TAC:
    composer require 'drupal/tac:^1.0@beta'
  2. Generate your sub-theme from the project root:
    vendor/bin/dr generate-theme my_theme --name "My theme" --starterkit tac_starterkit --path themes/custom
  3. Go to Appearance, install "My theme" and set it as the default. TAC is installed with it.
  4. Set your brand colours and fonts in my_theme/css/tokens.css, or under Appearance > Settings > My theme.

The README and docs/SUBTHEMING.md cover overriding tokens, replacing a component, adding CSS and JavaScript, and regions.

Requirements

  • Drupal 11.3 or later, or Drupal 12
  • PHP 8.3 or later
  • Drupal Canvas is optional

Project status

TAC is in beta. The component API is close to final, but breaking changes are still possible before 1.0.0 and are recorded in CHANGELOG.md. Bug reports and feedback are very welcome in the issue queue.

Supporting organizations: 
Development time

Project information

  • Created by gumnut on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases