Catálogo · Contenido
Showcase
Shows the sites, products or people a page is proud of, each a link with its logo and its name, in a row that wraps.
Encaja mejor en: landing — the sites built with a product, its customers or its sponsors
Example
Five invented sites, each a link with its mark and its name, in a row that wraps and is centred. To make it move, put it in a marquee.
LUZ ships no logos: the marks here are drawn for the example, and the names are made up.
Known issues
LUZ ships no brand logos: everything it serves is MIT, and a logo is not. The logos are yours, and so is the right to show them.
Code
Copy the markup
import "@luz-ds/catalog/components/showcase.css";
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/catalog@0.5.1/dist/components/showcase.min.css" integrity="sha384-otQ4YQzW60qAHhIF2DhlG+LCmIFMJjt+yKVYWzTKQIBfsB9FHWNzj0glr+fYQ8rT" crossorigin="anonymous">
A <luz-showcase> around a <ul> of links. Each link holds a decorative <svg> and the name in a <span>. Link components/showcase.css of @luz-ds/catalog after core.
<luz-showcase>
<ul>
<li>
<a href="https://greenleaf.example/" title="Greenleaf: a gardening journal">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">…</svg>
<span>Greenleaf</span>
</a>
</li>
<!-- one li for each site -->
</ul>
</luz-showcase>
To make it move, put it in a <luz-marquee>.
Variants and options
| Tag, attribute or property | Effect |
|---|---|
<luz-showcase> | Around a native list of links. The links sit in a row that wraps, centred, in small bold sans text. A tag that no script defines: no class, no role of its own |
title | On a link, optional: the name and one line about the site. It is the browser’s tooltip and is not read as the name of the link |
How it works
CSS from components/showcase.css of @luz-ds/catalog. No JavaScript: <luz-showcase> is a tag that no script ever defines.
- The list is a native
<ul>, so a screen reader says how many sites there are. The logo is an<svg aria-hidden="true">or an<img alt="">before the name, and the name is the name of the link. - The logo is
1.5emsquare and does not shrink. LUZ gives it a size, not a drawing: an<svg>sets its ownfillorstroke, and withcurrentColorit takes the colour of the link. - A link is quiet, in the secondary text colour, and takes the primary one under the pointer and with the keyboard focus. It never wraps its name: the row wraps between links.
- It does not move. To make it move, put it in a marquee, written twice: the marquee holds the motion, and this tag only the row.
Without JavaScript
Nothing changes: there is no script.
Keyboard and ARIA
- Tab: moves through the links in source order, each once.
- Enter: follows the link, as any link.
- Name: the text of the
<span>. The<svg>isaria-hidden="true", andtitleis not read as the name. - Target: a link is at least
--luz-control-md(36 px) high, over WCAG 2.5.8’s 24 px. - Language: a name in another language than the page carries its own
lang, on its<span>. - Not tested with a screen reader.
Contrast and focus are in the Design tab.
Design
When to use
Use it to show who uses, buys, sponsors or backs what the page is about, when the names are the proof: “Built with LUZ”, the customers of a product, the sponsors of an event, the partners of a school.
- Keep it still: every name can be read without waiting for it.
- To make it move, put it in a marquee, only when the band is a decoration and every link is also elsewhere on the page.
When not to use
Do not use it for the links of the site itself, for people’s profiles or for a gallery of work.
- For the site’s links, use site-footer or the navbar.
- For profiles and feeds, use social links.
- For what customers say, in their words, use a card with a quote.
- Do not show a site, a company or a person that has not agreed to it.
Do and don't
alt off: a link with only a logo and no text has no name for a screen reader to say.<a href="https://greenleaf.example/"><img src="greenleaf.svg"></a>
Writing the content
The name is the site’s own, as it writes it, in one to three words. Say what it is in the title if a reader may not know it.
- Write “Greenleaf”, not “Visit Greenleaf” and not “Logo of Greenleaf”: the link is a name, not a call to action.
- Keep the capitals the site uses, and put a
langon a name in another language. - The
titleis one line: the name, a colon and what it is. It is a help for the pointer, so nothing a reader needs may be only there. - Show the sites you can name and that have said yes. Five to ten read as a band; more, and the row is a wall.
Contrast and focus
The names and the logos take the secondary text colour, and the primary one under the pointer and with the focus. The band has no surface of its own: it sits on the one the page gives it.
| Part | Colour on background | Light | Dark | High contrast | Needs |
|---|---|---|---|---|---|
Name and logo | --luz-text-secondary on --luz-surface-page | 6.2:1 | 7.5:1 | 19.3:1 | 4.5:1 |
Name and logo under the pointer or with the focus | --luz-text-primary on --luz-surface-page | 15.8:1 | 15.1:1 | 21.0:1 | 4.5:1 |
Name and logo on a muted band | --luz-text-secondary on --luz-surface-muted | 6.2:1 | 7.5:1 | 18.4:1 | 4.5:1 |
Name and logo in a card | --luz-text-secondary on --luz-surface | 6.4:1 | 6.9:1 | 19.3:1 | 4.5:1 |
Focus ring | --luz-focus-ring on --luz-surface-page | 5.6:1 | 7.7:1 | 21.0:1 | 3:1 |
Measured from the token values of each mode, rounded down. Needs is the WCAG 2.2 AA minimum: 4.5:1 for text, 3:1 for focus rings.
- Focus: each link keeps core’s 2 px
--luz-focus-ringoutline. - The logo is never the only signal: the name is always text beside it.
Tokens it uses
The 8 tokens that the rules of catalog’s components/showcase.css read, by family. Each family links to its page, with the values in every mode. In Figma they are variables with the same names: see Tokens in Figma.
- Spacing and sizing
--luz-control-md,--luz-space-2xl,--luz-space-sm- Typography
--luz-font-sans,--luz-text-xl- Motion
--luz-duration-base
Keyboard and ARIA are in the Code tab.