Skip to main content

Base + Core + Catalog

A whole site with the catalog

One stylesheet per piece of a whole site: link only the ones you use, and its script loads only when the piece is on the page.

  • 44 pieces, a stylesheet each
  • 8 scripts, loaded only when needed
  • 59.7 KB gzipped, all three packages
  • 0 dependencies

Try it: pick a kind of site

Kind of site

The stylesheets this site links

<link rel="stylesheet" href="…/components/navbar.min.css">
<link rel="stylesheet" href="…/components/sidebar.min.css">
<link rel="stylesheet" href="…/components/timeline.min.css">
<link rel="stylesheet" href="…/components/site-header.min.css">
<link rel="stylesheet" href="…/components/hero.min.css">
<link rel="stylesheet" href="…/components/main.min.css">
<link rel="stylesheet" href="…/components/section.min.css">
<link rel="stylesheet" href="…/components/stat.min.css">
<link rel="stylesheet" href="…/components/site-footer.min.css">
<link rel="stylesheet" href="…/components/glow.min.css">
<link rel="stylesheet" href="…/components/social.min.css">
<link rel="stylesheet" href="…/components/tool.min.css">
<link rel="stylesheet" href="…/components/pager.min.css">
<link rel="stylesheet" href="…/components/page-transition.min.css">
<script type="module" src="…/catalog.min.js"></script><link rel="stylesheet" href="…/components/navbar.min.css">
<link rel="stylesheet" href="…/components/sidebar.min.css">
<link rel="stylesheet" href="…/components/timeline.min.css">
<link rel="stylesheet" href="…/components/site-header.min.css">
<link rel="stylesheet" href="…/components/masthead.min.css">
<link rel="stylesheet" href="…/components/site-footer.min.css">
<link rel="stylesheet" href="…/components/social.min.css">
<link rel="stylesheet" href="…/components/page-header.min.css">
<link rel="stylesheet" href="…/components/article-header.min.css">
<link rel="stylesheet" href="…/components/article.min.css">
<link rel="stylesheet" href="…/components/post-list.min.css">
<link rel="stylesheet" href="…/components/pager.min.css">
<link rel="stylesheet" href="…/components/page-transition.min.css">
<script type="module" src="…/catalog.min.js"></script><link rel="stylesheet" href="…/components/navbar.min.css">
<link rel="stylesheet" href="…/components/sidebar.min.css">
<link rel="stylesheet" href="…/components/social.min.css">
<link rel="stylesheet" href="…/components/app-bar.min.css">
<link rel="stylesheet" href="…/components/dashboard.min.css">
<link rel="stylesheet" href="…/components/bar-list.min.css">
<link rel="stylesheet" href="…/components/column-chart.min.css">
<link rel="stylesheet" href="…/components/stacked-bar.min.css">
<link rel="stylesheet" href="…/components/heat-map.min.css">
<link rel="stylesheet" href="…/components/ring.min.css">
<link rel="stylesheet" href="…/components/tool.min.css">
<link rel="stylesheet" href="…/components/pager.min.css">
<link rel="stylesheet" href="…/components/page-transition.min.css">
<script type="module" src="…/catalog.min.js"></script><link rel="stylesheet" href="…/components/navbar.min.css">
<link rel="stylesheet" href="…/components/sidebar.min.css">
<link rel="stylesheet" href="…/components/terminal.min.css">
<link rel="stylesheet" href="…/components/social.min.css">
<link rel="stylesheet" href="…/components/docs-layout.min.css">
<link rel="stylesheet" href="…/components/doc-header.min.css">
<link rel="stylesheet" href="…/components/page-rail.min.css">
<link rel="stylesheet" href="…/components/example.min.css">
<link rel="stylesheet" href="…/components/do-dont.min.css">
<link rel="stylesheet" href="…/components/pager.min.css">
<link rel="stylesheet" href="…/components/page-footer.min.css">
<link rel="stylesheet" href="…/components/page-transition.min.css">
<script type="module" src="…/catalog.min.js"></script>

Use it in three steps

  1. 1. Install

    Tokens, core and the catalog: the catalog needs the other two before it.

    npm
    npm install @luz-ds/tokens @luz-ds/core @luz-ds/catalog
    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. Link the pieces you use

    One link per piece, after core. The ones you do not link weigh nothing on your page.

    HTML
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/catalog@0.5.1/dist/components/search.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/catalog@0.5.1/dist/components/lang-switch.min.css">
  3. 3. Add the script once

    It looks at the page and loads the script of each element it finds, and only then.

    HTML
    <script type="module" src="https://cdn.jsdelivr.net/npm/@luz-ds/catalog@0.5.1/dist/catalog.min.js"></script>
    
    <luz-search>…</luz-search>
  4. What you get

    • Pay for what you use: a page that needs the search links the search, not the charts.
    • Works without JavaScript: the search is a link to the index, the language switch a list of links.
    • Nothing loads that the page does not use: each script waits until its element is there.

Navigation and structure

The skeleton of a page: the navigation bar, the sidebar, the site header and the footer, composed from core's objects with only their own skin.

<link rel="stylesheet" href="…/components/site-header.min.css">
<link rel="stylesheet" href="…/components/navbar.min.css">

site-header navbar submenu lang-switch hero section site-footer

Spring book fair · 12 May

Books for long evenings

New titles every week, chosen by the people who read them.

New on the shelves

See all new books
<nav class="luz-navbar">…<luz-submenu>…</luz-submenu></nav>
<section class="luz-hero">…</section>

masthead page-header article-header

Reviews

What our booksellers read this month, and why.

Poetry

Six poets who wrote by the sea

From the harbour to the lighthouse: the books we keep coming back to.

<header class="luz-masthead">…</header>
<header class="luz-article-header">…</header>

sidebar app-bar tool

Orders

<nav class="luz-sidebar">…</nav>
<header class="luz-app-bar">…</header>
<div class="luz-tool">…</div>

Content

What a page says: a hero, questions and answers, numbers, a timeline.

faq

Renting a bike

Booking and pickup

What do I need to bring?

A photo ID and a card for the deposit, which we release when you return the bike.

Can I cancel a booking?

Yes, free of charge until a day before pickup.

Can I ride outside the city?

Yes, as long as you bring the bike back to the shop.

<link rel="stylesheet" href="…/components/faq.min.css">

embed

<link rel="stylesheet" href="…/components/embed.min.css">

toc

<link rel="stylesheet" href="…/components/article.min.css">

timeline

  1. First beta

    A few teams try the app.

  2. Public launch

    Sign-up opens to everyone.

  3. Offline mode

    Notes sync when the connection returns.

<link rel="stylesheet" href="…/components/timeline.min.css">

post-list

<link rel="stylesheet" href="…/components/post-list.min.css">

stat

  • 4,000+

    teams on the platform

  • 99.95%

    uptime in the last year

  • 12

    minutes to set up, on average

<link rel="stylesheet" href="…/components/stat.min.css">

terminal

npm install @luz-ds/catalog
<link rel="stylesheet" href="…/components/terminal.min.css">

marquee

  • Zero dependencies
  • Native HTML first
  • Accessible from the first page
<link rel="stylesheet" href="…/components/marquee.min.css">

showcase

<link rel="stylesheet" href="…/components/showcase.min.css">

Charts

Data drawn over a native list, table or meter that stays in the page: a stylesheet each, no charting library.

<link rel="stylesheet" href="…/components/dashboard.min.css">
<link rel="stylesheet" href="…/components/chart.min.css">
<link rel="stylesheet" href="…/components/column-chart.min.css">
<link rel="stylesheet" href="…/components/bar-list.min.css">
<link rel="stylesheet" href="…/components/ring.min.css">
<link rel="stylesheet" href="…/components/stacked-bar.min.css">
<link rel="stylesheet" href="…/components/heat-map.min.css">
dashboard

Overview

chart · sparkVisitors a day58

  • chart

    Visitors by device, January to June

    05001,0001,500JanFebMarAprMayJun
    • Desktop
    • Mobile
  • ring

    Goal this month

    Goal this month

    1,260of 2,000 orders

  • column-chart

    Orders per day

    Orders per day
    MonTueWedThuFri
    12096134150172
  • heat-map
    Visits by part of the dayThe stronger the colour, the more visits.
    MonTueWedThuFri
    Morning120240360480600
    Afternoon060300180540
    Evening3090150270420
  • bar-list

    Visits by page

    • Home1,204
    • Docs812
    • Blog377
  • stacked-bar

    Traffic by source

    Traffic by source
    • Search 52 %
    • Direct 26 %
    • Social 14 %
    • Email 6 %
    • Other 2 %

Site-wide and docs

What acts for the whole site: search, the cookie question and the language switch, and the layout of a documentation site.

<body class="o-shell luz-docs-layout">
<nav class="luz-sidebar luz-docs-nav">
<aside class="luz-page-rail">
<main class="o-main luz-docs-main">
  <header class="luz-doc-header">
  <figure class="luz-example">
  <div class="luz-do-dont">
  <ul class="luz-pager">
  <p class="luz-page-footer">

announcement

Open day. Visit the winery on Saturday, from 11:00 to 18:00. Book a visit

Planned maintenance. The shop closes on Monday from 07:00 to 09:00. See what still works

<link rel="stylesheet" href="…/components/announcement.min.css">

page-transition

No class: link the file and each page fades into the next. Under reduced motion nothing moves.

<link rel="stylesheet" href="…/components/page-transition.min.css">

theme-time

Madrid · Afternoon

13:00

Time of day
<link rel="stylesheet" href="…/components/theme-time.min.css">

Acme docs

Guides · Setup

Install the command line tool

Add the tool to a project and check that it runs, in about two minutes.

<button class="luz-btn">…</button>
Do Title a page for what it lets the reader do.
Don't Use a title that fits any page.

Next: pick the kind of site you are building

The docs have a snippet with the right links for each, and the /luz skill starts it with you: a landing page, a blog, a web app or a documentation site.