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
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. Install
Tokens, core and the catalog: the catalog needs the other two before it.
npm install @luz-ds/tokens @luz-ds/core @luz-ds/catalog<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. Link the pieces you use
One link per piece, after core. The ones you do not link weigh nothing on your page.
<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. Add the script once
It looks at the page and loads the script of each element it finds, and only then.
<script type="module" src="https://cdn.jsdelivr.net/npm/@luz-ds/catalog@0.5.1/dist/catalog.min.js"></script> <luz-search>…</luz-search> -
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.
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>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">toc
<link rel="stylesheet" href="…/components/article.min.css">timeline
First beta
A few teams try the app.
Public launch
Sign-up opens to everyone.
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">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">
dashboardOverview
chart · sparkVisitors a day58
chart- Desktop
- Mobile
ringGoal this month
Goal this month 1,260of 2,000 orders
column-chartOrders per day
Orders per day Mon Tue Wed Thu Fri 120 96 134 150 172 heat-mapVisits by part of the dayThe stronger the colour, the more visits. Mon Tue Wed Thu Fri Morning 120 240 360 480 600 Afternoon 0 60 300 180 540 Evening 30 90 150 270 420 bar-listVisits by page
stacked-barTraffic by source
Traffic by source
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">search
With JavaScript
Without JavaScript
<link rel="stylesheet" href="…/components/search.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
<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>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.