Skip to main content

Base + Core

Components with core

Write the HTML you already know and it comes styled: elements, components and layout objects over the tokens, in a cascade layer your CSS always wins.

  • 29 components
  • 10 layout objects
  • 26.5 KB gzipped, with tokens
  • 0 dependencies

Try it: the same page, three ways

How the page is written

Join the newsletter

New

Join the newsletter

New

Join the newsletter

The page's HTML

<h3>Join the newsletter</h3>
<label>Email
  <input type="email">
</label>
<p>
  <button type="submit">Subscribe</button>
  <button type="button">Not now</button>
</p><span class="luz-tag luz-tag--blue">New</span>
<h3>Join the newsletter</h3>
<div class="luz-field">
  <label class="luz-field__label">Email</label>
  <input class="luz-input" type="email">
</div>
<button class="luz-btn luz-btn--primary">Subscribe</button>
<button class="luz-btn luz-btn--outline">Not now</button><span class="luz-tag luz-tag--blue">New</span>
<h3>Join the newsletter</h3>
<div class="luz-field">
  <label class="luz-field__label">Email</label>
  <input class="luz-input" type="email">
</div>
<button class="luz-btn luz-btn--primary">Subscribe</button>
<button class="luz-btn luz-btn--outline">Not now</button>

/* your own CSS, no !important */
.luz-btn {
  border-radius: var(--luz-radius-full);
  text-transform: uppercase;
}

Use it in three steps

  1. 1. Install

    Tokens and core: two packages, or three links from the CDN.

    npm
    npm install @luz-ds/tokens @luz-ds/core
    CDN
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/tokens@0.5.1/dist/luz-tokens.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/core@0.5.1/dist/luz.min.css">
    <script type="module" src="https://cdn.jsdelivr.net/npm/@luz-ds/core@0.5.1/dist/luz.min.js"></script>
  2. 2. Write HTML, nothing else

    Every element already has its style: no class, no setup. The browser keeps the state, the keyboard and the validation.

    HTML
    <form>
      <label>Email <input type="email"></label>
      <button>Subscribe</button>
    </form>
  3. 3. Add a class when you need more

    A component class for a variant, an object for a layout. Your own CSS comes after and wins.

    HTML
    <button class="luz-btn luz-btn--outline">Cancel</button>
    
    <div class="o-grid o-grid--auto">
      <div class="luz-card">…</div>
      <div class="luz-card">…</div>
    </div>
  4. What you get

    • Accessible from the HTML: native elements, focus rings and contrast checked in every mode.
    • No JavaScript for the styles: the few components with a script load it only when they are on the page.
    • Your CSS always wins: LUZ lives in a cascade layer, so you never need !important.

Actions

One button class: the variants, the states, with an icon or an icon alone, the sizes and the full width, on a native <button> or <a>; a copy button, and a dropdown that is a native popover.

Buttons

Variants

States

With an icon

Sizes

Full width

<button class="luz-btn luz-btn--primary luz-btn--lg">

Copy button

npm install @luz-ds/core
<button class="luz-copy-btn" data-copy="npm install">

Dropdown

  • Edit

<div class="luz-dropdown">
  <button popovertarget="menu">
  <div class="luz-dropdown__menu" popover>

Forms

Fields, text areas, selects and choices are native controls with LUZ's look: the browser keeps the state, the keyboard and the validation.

<form>
  <fieldset class="luz-fieldset">
    <legend>…</legend>
    <div class="luz-field">
      <label class="luz-field__label">…</label>
      <input class="luz-input">
    </div>
  </fieldset>
  <button class="luz-btn luz-btn--primary">…</button>
</form>
Your account
We never share it.
Error: Use at least 12 characters.
Your plan

Content and navigation

Cards, tags, tables, figures, prose, code and icons, and the way around a page: the skip link, the breadcrumb, the tabs and the pagination. Each one class.

<nav class="luz-tabs">
  <a class="luz-tab" aria-current="page">…</a>
</nav>
<div class="luz-card">…</div>
<table class="luz-table">…</table>
<ul class="luz-pagination">…</ul>
AR

API gateway Active

By Ana Ruiz 5 min read

InternalBetaDocumentedNew

LGMC
Region
eu-west
Plan
Team
Requests
1.2 million a day

The gateway routes every request to its service and keeps a log of each one, so you can see what happened and when.

  • Two regions, one address.
  • A log of every request.

Each route sets its own rate_limit.

Requests per day, last six days.

Uptime

99.9% this month.

How do I add a route?

In Settings: it is live in a minute.

Who can see the logs?

The members of the project, and no one else.

Services
ServiceStatusCPU use
api-gatewayRunning12%
data-pipelineDegraded78%
mailerStopped0%
Guide

Use your own domain

Point a domain at the gateway and it gets its certificate on its own.

.route {
  rate_limit: 100/min;
}
  • menu
  • search
  • close
  • check

Version 2 is out

Faster routes and a new view of the logs.

Color mode

Layout

10 objects lay out the page, from the shell with its sidebar to the row of actions, and space their children with one gap; the utilities and the shared animations do the rest. You write the structure, not the margins.

<div class="o-shell">
  <aside>…</aside>
  <div class="o-main o-page">
    <header class="o-sticky">…</header>
    <main class="o-container o-stack">
      <div class="o-grid o-grid--auto">…</div>
      <div class="o-actions">…</div>
    </main>
  </div>
</div>
o-main · o-page
o-stickyDeploying
o-container
o-stack
o-media

Every service of the project, at a glance

api-gateway · eu-west

o-grid
o-row
o-actions
o-shell > footer

Next: a whole site, with the catalog

Core is what every page needs. The catalog adds what a whole site does: search, cookie consent, charts and the language switch, one stylesheet each.