Patterns · Dashboard
QuickLinks
A row of plain links with icon, title, subtitle and chevron. The start screen uses it under the product cards for contracts, account settings and payment methods.
import * as QuickLinks from '@statix/ui/quick-links';Examples
From data
Pass items with an icon component each. Three columns from the sm breakpoint, stacked below.
<script lang="ts">
import * as QuickLinks from '@statix/ui/quick-links';
import LockIcon from '@lucide/svelte/icons/lock';
import LogInIcon from '@lucide/svelte/icons/log-in';
import ReceiptEuroIcon from '@lucide/svelte/icons/receipt-euro';
const links = [
{
href: '#contracts',
title: 'Contracts & prices',
description: 'Services and notice periods',
icon: ReceiptEuroIcon
},
{
href: '#account',
title: 'Account settings',
description: 'Your details and your login',
icon: LogInIcon
},
{
href: '#payment',
title: 'Payment methods',
description: 'How you pay Statix',
icon: LockIcon
}
];
</script>
<QuickLinks.Root items={links} class="w-full" />Composed
Use QuickLinks.Item inside <li> elements when a link needs its own attributes or an icon snippet.
<script lang="ts">
import * as QuickLinks from '@statix/ui/quick-links';
import FileTextIcon from '@lucide/svelte/icons/file-text';
import LifeBuoyIcon from '@lucide/svelte/icons/life-buoy';
</script>
<nav aria-label="Help" class="w-full">
<QuickLinks.Root columns={2}>
<li>
<QuickLinks.Item href="#guides" title="Guides" description="Step by step, with screenshots">
{#snippet icon()}<FileTextIcon />{/snippet}
</QuickLinks.Item>
</li>
<li>
<QuickLinks.Item
href="https://status.statix.de"
title="Service status"
description="Live status of all servers"
target="_blank"
rel="noreferrer"
>
{#snippet icon()}<LifeBuoyIcon />{/snippet}
</QuickLinks.Item>
</li>
</QuickLinks.Root>
</nav>Guidelines
Do
- Use it for secondary destinations that customers need now and then.
- Keep the subtitle to a few words on what is behind the link.
Don't
- Don’t put more than four links in a row.
- Don’t use it for products. Use ProductCard.
Accessibility
- Renders a <ul>; each link sits in an <li>. Wrap it in a <nav aria-label="…"> if it is a navigation landmark on your page.
- The link name is title plus subtitle. Icons and chevrons are hidden.
API reference
QuickLinks.Root
renders<ul> and accepts its attributes| Prop | Type | Default |
|---|---|---|
items | { href: string; title: string; description?: string; icon?: Component }[] Links to render. Ignored when children are passed. | – |
columns | 2 | 3 | 4 Columns from the sm breakpoint up. | 3 |
children | Snippet <li> elements with QuickLinks.Item. | – |
ref bind | HTMLUListElement | null The list element. | – |
class | ClassValue Merged with the grid classes; yours win. | – |
| Data attribute | Meaning |
|---|---|
data-slot="quick-links" | The list. |
QuickLinks.Item
renders<a> and accepts its attributes| Prop | Type | Default |
|---|---|---|
href * | string Link target. | – |
title * | string Link text. | – |
description | string Line under the title. | – |
iconComponent | Component Icon component, e.g. a Lucide icon. | – |
icon | Snippet Icon snippet. Wins over iconComponent. | – |
ref bind | HTMLAnchorElement | null The link element. | – |
class | ClassValue Merged with the link classes; yours win. | – |
| Data attribute | Meaning |
|---|---|
data-slot="quick-link" | Each link. Parts use quick-link-icon, -title, -description. |