Files
quiver-launcher/packages/ui
Thomas Georgiadis b2fbb1c51f Make Downloads, settings rows and app labels consistent (#401)
* Make Downloads, settings rows and app labels consistent

- Downloads: Play on a finished row is a plain button, and with more than
  one update waiting, Update all is the page's one filled button.
- A decomp tag reads "Source port", as the copy standard has it.
- The app page's "Project details" is "App details", in every language.
- General and Apps folder settings are rows: name left, control right.
- The Settings icon has a tooltip, as the other top bar icons do.

* Wait for both sidebar rows before measuring them

The test read the rows as soon as the first one showed, and now and then
that was before the second had.
2026-11-15 13:10:51 +11:00
..
2026-10-31 21:54:21 +11:00
2026-10-31 21:54:21 +11:00

@quiverlauncher/ui

The catalog's components and styles, shared by Quiver Launcher and quiverlauncher.com so an app looks the same in both: the catalog card and its parts (artwork, platform icons, score, AI chip, release age), tag and date formatting, and README rendering.

It isn't published anywhere: quiverlauncher.com includes this repository as a git submodule and builds it from source, with react, lucide-react and react-icons as peers.

import { EntryCard, EntryCardContent } from "@quiverlauncher/ui";
import { Markdown } from "@quiverlauncher/ui/markdown"; // large, so it's its own import
import "@quiverlauncher/ui/catalog.css";

// A card that opens the app with a button, as in the launcher:
<EntryCard entry={entry} onOpen={() => open(entry)} action={<button>Get</button>} />

// Or wrapped in your own link, as on the website:
<Link to={`/apps/${entry.slug}`} className="entry-card">
  <EntryCardContent entry={entry} heading="h2" />
</Link>

The components don't need a router or a data layer: a card takes an entry from @quiverlauncher/api (or anything shaped like CardEntry).

Colours

catalog.css sets layout and type, and takes every colour from a --ql-* variable, so each app keeps its own palette and light/dark themes. Define these, for example on :root:

Variable Used for
--ql-card, --ql-card-line, --ql-card-shadow A card's background, border, and shadow when hovered
--ql-accent A hovered or focused card's border
--ql-cover-1 … --ql-cover-4 Backgrounds behind card art, in turn
--ql-artwork-icon, --ql-artwork-shadow The placeholder icon, and the shadow under icon art
--ql-arrow-line, --ql-arrow-bg, --ql-arrow-fg The arrow on a card's cover
--ql-badge-bg, --ql-badge-fg The "New" (or other) badge
--ql-card-kind, --ql-separator, --ql-platform-icons The type and console line, its dots, and platform icons
--ql-ai-chip-line, --ql-ai-chip-fg The AI chip
--ql-based-on-label, --ql-chip-fg, --ql-chip-bg, --ql-chip-line "Based on" and its game chips
--ql-card-meta, --ql-release-none The bottom row's text, and "No releases"
--ql-positive, --ql-caution, --ql-negative, --ql-score-muted Scores, and a stale release (caution)
--ql-line, --ql-line-strong Dividers and markdown rules, tables and quote bars
--ql-md-text, --ql-md-heading, --ql-md-quote, --ql-md-th Markdown text, headings, quotes and table headers
--ql-link, --ql-link-underline Markdown links
--ql-code-bg, --ql-pre-bg Inline code and code blocks

Tokens and controls

tokens.css holds the colour roles both apps share (--bg, --panel, --card, --field, --line, --fg, --strong, --muted, --accent, --on-accent, --link, --green, --caution, --danger), dark by default and light under :root[data-theme="light"], with the scales: type (--size-11 … --size-38), spacing (--space-4 … --space-48), corners (--radius-4 … --radius-16, --radius-pill) and the two shadows (--shadow-menu, --shadow-dialog). An app imports it first and gives the --ql-* variables above from it.

controls.css and @quiverlauncher/ui/controls are the basic controls, built on those tokens:

import { Button, Dialog, Field, Panel } from "@quiverlauncher/ui/controls";
import "@quiverlauncher/ui/tokens.css";
import "@quiverlauncher/ui/controls.css";

<Panel title="Language">
  <Field label="Shown in" hint="Quiver restarts to change it.">
    <select>…</select>
  </Field>
  <Button variant="main" busy={saving} busyLabel="Saving…" onClick={save}>Save</Button>
</Panel>

Button is main (one per view), neutral (the default), text or danger, and a link with href. Dialog asks one question, with the main button on the right. They have no words of their own: labels come from the app. A page without React uses the classes directly (ql-button main, ql-panel, ql-panel-title, ql-actions).

Developing

pnpm --filter @quiverlauncher/ui test runs its tests.

All rights reserved. See the repository's LICENSE.