axi-designv1.50.0

Shells

Card

One thing you can open, drawn as a raised surface you press. Its optional top strip is the one place a card carries colour, and only when there is real data to put in it.

.axi-card .axi-card--strip .axi-card__head .axi-card__glyph .axi-card__title .axi-card__name .axi-card__kind .axi-card__meta .axi-card__go

The strip is opt-in because a coloured strip that means nothing is decoration impersonating data, and it takes the first position the eye lands on. Where it goes is part of rule 5: status colour caps the reading it is a verdict on - a short bar across the head - rather than framing the box down one edge, because a full-height stripe reads as the box's border and five cards in a row become five coloured frames with the colour saying nothing about any one of them. It is drawn with a pseudo-element from the card itself, so a renderer never has to emit an extra element for it.

__meta is pushed to the bottom with margin-top: auto, so in an equalised grid row every card's meta rule lands on the same line and the rules read as continuous across the grid. The cost is empty space on cards with less content, and it is worth it. __name truncates with an ellipsis rather than wrapping, because a wrapping title changes the card's height and takes the grid row with it.

A card in a set where one is chosen takes the same marked state .axi-panel does, from the same rule: [aria-current], [aria-pressed="true"], [aria-selected="true"], or a checked radio it directly contains. The surface rises and the accent goes to the edge; the strip is unaffected, because the strip encodes data about the thing and being picked is not data about the thing. See Panel for why it is an edge rather than a fill, and why the attribute is the interface.

A grid of cards, with and without a strip

The third card has nothing to encode, so it gets no strip
<div class="axi-grid" style="--axi-grid-min: 280px">
  <a class="axi-card axi-card--strip" href="#" style="--axi-card-strip: var(--axi-ok)">
    <div class="axi-card__head">
      <span class="axi-card__glyph">OM</span>
      <span class="axi-card__title">
        <span class="axi-card__name">AxiOM</span>
        <span class="axi-card__kind">Launcher</span>
      </span>
    </div>
    <p>One launcher for every Axi app. Installs, updates and launches the whole suite.</p>
    <div class="axi-row" style="--axi-row-gap: 6px">
      <span class="axi-chip axi-chip--ok">Stable</span>
      <span class="axi-chip">Desktop</span>
    </div>
    <div class="axi-card__meta">Electron <span class="axi-card__go">Docs &rarr;</span></div>
  </a>
  <a class="axi-card axi-card--strip" href="#" style="--axi-card-strip: var(--axi-warn)">
    <div class="axi-card__head">
      <span class="axi-card__glyph">BR</span>
      <span class="axi-card__title">
        <span class="axi-card__name">AxiBridge</span>
        <span class="axi-card__kind">Log uploader</span>
      </span>
    </div>
    <p>Uploads arcdps logs, summarizes WvW fights, and posts readable reports to Discord.</p>
    <div class="axi-row" style="--axi-row-gap: 6px">
      <span class="axi-chip axi-chip--warn">Beta</span>
      <span class="axi-chip axi-chip--meta">arcdps</span>
    </div>
    <div class="axi-card__meta">Node <span class="axi-card__go">Docs &rarr;</span></div>
  </a>
  <a class="axi-card" href="#">
    <div class="axi-card__head">
      <span class="axi-card__glyph">LG</span>
      <span class="axi-card__title">
        <span class="axi-card__name">axilog</span>
        <span class="axi-card__kind">No strip</span>
      </span>
    </div>
    <p>A card with nothing to encode in a strip gets none. A coloured strip must mean something.</p>
    <div class="axi-card__meta">Rust <span class="axi-card__go">Docs &rarr;</span></div>
  </a>
</div>

Knobs

PropertySetsFallback
--axi-card-stripthe colour of .axi-card--strip's top stripvar(--axi-accent)

Rules this answers