# Class recipes (plain HTML)

The same markup the React components render. Load `@enma-design/css` (or inline `enma.css` in an artifact), set the root and use these classes. Class prefix `e-`.

```html
<html lang="en" data-enma="paper" data-theme="light">
  <body class="e-canvas">
    ...
  </body>
</html>
```

```html
<!-- Buttons: variant primary | secondary | ghost | danger, size sm | md | lg -->
<button type="button" class="e-btn e-sq e-btn--primary e-btn--md">Start workout</button>
<button type="button" class="e-btn e-sq e-btn--secondary e-btn--sm">Export</button>

<!-- Icon button: always an aria-label -->
<button
  type="button"
  class="e-iconbtn e-sq e-iconbtn--ghost e-iconbtn--md"
  aria-label="Settings"
  title="Settings"
>
  <svg
    class="e-icon"
    width="20"
    height="20"
    viewBox="0 0 24 24"
    fill="none"
    stroke="currentColor"
    stroke-width="1.75"
    stroke-linecap="round"
    stroke-linejoin="round"
    aria-hidden="true"
  >
    <path d="M12 5v14M5 12h14" />
  </svg>
</button>

<!-- Cards: e-card--hero for the one hero, e-card--raised inside a card, e-card--frame for phone shells -->
<div class="e-card e-sq e-card--hero e-card--pad-lg">
  <div class="e-stat e-stat--hero">
    <div class="e-stat__label">Weekly volume</div>
    <div class="e-stat__row">
      <span class="e-stat__value"
        ><span aria-hidden="true">12,480</span><span class="e-visually-hidden">12,480 kg</span></span
      >
      <span class="e-stat__unit" aria-hidden="true">kg</span>
      <span class="e-badge e-badge--positive e-stat__delta">+8%</span>
    </div>
  </div>
  <!-- add the class is-in after load to make the bars grow; the label is the chart's text summary -->
  <div
    class="e-bars is-in"
    style="height:64px;margin-top:18px"
    role="img"
    aria-label="Weekly volume: Monday 40, Tuesday 72, Wednesday 100"
  >
    <i class="e-bars__bar" style="height:40%"></i><i class="e-bars__bar" style="height:72%"></i
    ><i class="e-bars__bar is-on" style="height:100%"></i>
  </div>
</div>

<!-- Badge: tone neutral | accent | positive | negative -->
<span class="e-badge e-badge--positive"><span class="e-badge__dot" aria-hidden="true"></span>Paid</span>

<!-- List group -->
<ul class="e-list e-sq">
  <li>
    <div class="e-list__row">
      <span class="e-list__text"><span>Bench press</span></span
      ><span class="e-list__meta">4 × 8 · 80 kg</span>
    </div>
  </li>
  <li>
    <a class="e-list__row e-list__row--action" href="/settings"
      ><span class="e-list__text"><span>Settings</span></span></a
    >
  </li>
</ul>

<!-- Text field -->
<div class="e-field">
  <label class="e-field__label" for="ws">Workspace name</label>
  <div class="e-field__control e-sq">
    <input class="e-field__input" id="ws" placeholder="Acme Labs" aria-describedby="ws-hint" />
  </div>
  <div class="e-field__hint" id="ws-hint">Shown on invoices.</div>
</div>

<!-- Table: is-end right-aligns, is-num uses tabular figures, is-muted for quiet columns -->
<div class="e-table-wrap e-sq">
  <table class="e-table">
    <caption class="e-visually-hidden">
      Invoices
    </caption>
    <thead>
      <tr>
        <th scope="col">Customer</th>
        <th scope="col" class="is-end">Amount</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Northwind</td>
        <td class="is-end is-num">$1,240.00</td>
      </tr>
    </tbody>
  </table>
</div>

<!-- Switch and checkbox -->
<label class="e-switch"
  ><input class="e-switch__input" type="checkbox" role="switch" checked />
  <span class="e-switch__track" aria-hidden="true"><span class="e-switch__thumb"></span></span
  ><span>Rest timer</span></label
>
<label class="e-check"
  ><input class="e-check__input" type="checkbox" />
  <span class="e-check__box" aria-hidden="true"
    ><svg
      class="e-icon"
      width="14"
      height="14"
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      stroke-width="2.5"
      stroke-linecap="round"
      stroke-linejoin="round"
    >
      <path d="M5 12.5l4.5 4.5L19 7" /></svg></span
  ><span>Warm-up done</span></label
>

<!-- Progress -->
<div class="e-progress">
  <div class="e-progress__head">
    <span id="goal">Weekly goal</span><span class="e-progress__value">4 of 5 sessions</span>
  </div>
  <div
    class="e-progress__track"
    role="progressbar"
    aria-labelledby="goal"
    aria-valuemin="0"
    aria-valuemax="100"
    aria-valuenow="80"
    aria-valuetext="4 of 5 sessions"
  >
    <div class="e-progress__fill" style="width:80%"></div>
  </div>
</div>

<!-- Toast: role status, or alert for errors -->
<div class="e-toast e-sq e-toast--positive" role="status">
  <span class="e-toast__icon" aria-hidden="true"
    ><svg
      class="e-icon"
      width="16"
      height="16"
      viewBox="0 0 24 24"
      fill="none"
      stroke="currentColor"
      stroke-width="2.25"
      stroke-linecap="round"
      stroke-linejoin="round"
    >
      <path d="M5 12.5l4.5 4.5L19 7" /></svg
  ></span>
  <div class="e-toast__body">
    <div class="e-toast__title">Invoice sent</div>
    <div class="e-toast__desc">Northwind will get it in a minute.</div>
  </div>
</div>
```

Type helpers: `e-display-xl`, `e-display`, `e-title`, `e-heading`, `e-body-lg`, `e-body`, `e-label`, `e-caption`, `e-eyebrow`, `e-num`, `e-meta`. `e-visually-hidden` keeps text for screen readers only.

Your own elements: use only `--e-*`, `--space-*`, `--control-*`, `--duration-*` and `--easing-*`.

```css
.screen {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}
.panel {
  background: var(--e-surface);
  border-radius: var(--e-r-lg);
  box-shadow: var(--e-shadow-card);
}
```
