layout.siblings

Links to the pages beside this one, side by side with the open one filled: the other intents in a domain. One line; scrolls sideways when it overflows, with no scrollbar. Pass data-fade="start", "end" or "both" to fade the edges that hide more. Children are nav.page; pass current on the open one

Component

Renders

<nav>

Profile

Example

Preview
<Layout intent="layout.siblings">
…
</Layout>

Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

  • If it is

    Use

  • Links to the pages beside this one, side by side with the open one filled: the other intents in a domain. One line; scrolls sideways when it overflows, with no scrollbar. Pass data-fade="start", "end" or "both" to fade the edges that hide more. Children are nav.page; pass current on the open one

    layout.siblings this page
  • Switching between views of the same content

    nav.view
  • Controls that act on the content below them

    layout.toolbar

Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

For registry authors

Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How layout.siblings resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • arrange.row

    Children in a wrapping row

    flex flex-row flex-wrap items-center
  • layout.siblings

    Links to the pages beside this one, side by side with the open one filled: the other intents in a domain. One line; scrolls sideways when it overflows, with no scrollbar. Pass data-fade="start", "end" or "both" to fade the edges that hide more. Children are nav.page; pass current on the open one

    w-fit max-w-full flex-nowrap gap-0.5 overflow-x-auto
    [scrollbar-width:none] [&::-webkit-scrollbar]:hidden
    data-[fade=start]:[mask-image:linear-gradient(to_right,transparent,black_3rem)]
    data-[fade=end]:[mask-image:linear-gradient(to_left,transparent,black_3rem)]
    data-[fade=both]:[mask-image:linear-gradient(to_right,transparent,black_3rem,black_calc(100%-3rem),transparent)]
    [&>a]:shrink-0 [&>a]:whitespace-nowrap [&>a]:rounded-full
    [&>a]:px-3 [&>a]:py-1 [&>a]:text-surface-muted
    [&>a:hover]:bg-foreground/5 [&>a:hover]:text-foreground
    [&>a[aria-current]]:bg-foreground/10
    [&>a[aria-current]]:text-foreground
Final classes
flex flex-row items-center w-fit max-w-full flex-nowrap gap-0.5
overflow-x-auto [scrollbar-width:none]
[&::-webkit-scrollbar]:hidden
data-[fade=start]:[mask-image:linear-gradient(to_right,transparent,black_3rem)]
data-[fade=end]:[mask-image:linear-gradient(to_left,transparent,black_3rem)]
data-[fade=both]:[mask-image:linear-gradient(to_right,transparent,black_3rem,black_calc(100%-3rem),transparent)]
[&>a]:shrink-0 [&>a]:whitespace-nowrap [&>a]:rounded-full
[&>a]:px-3 [&>a]:py-1 [&>a]:text-surface-muted
[&>a:hover]:bg-foreground/5 [&>a:hover]:text-foreground
[&>a[aria-current]]:bg-foreground/10
[&>a[aria-current]]:text-foreground
Definition
TS
'layout.siblings': {
kind: 'semantic',
description: 'Links to the pages beside this one, side by side with the open one filled: the other intents in a domain. One line; scrolls sideways when it overflows, with no scrollbar. Pass data-fade="start", "end" or "both" to fade the edges that hide more. Children are nav.page; pass current on the open one',
refs: ['arrange.row'],
binding: {
element: 'nav',
classes: 'w-fit max-w-full flex-nowrap gap-0.5 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden data-[fade=start]:[mask-image:linear-gradient(to_right,transparent,black_3rem)] data-[fade=end]:[mask-image:linear-gradient(to_left,transparent,black_3rem)] data-[fade=both]:[mask-image:linear-gradient(to_right,transparent,black_3rem,black_calc(100%-3rem),transparent)] [&>a]:shrink-0 [&>a]:whitespace-nowrap [&>a]:rounded-full [&>a]:px-3 [&>a]:py-1 [&>a]:text-surface-muted [&>a:hover]:bg-foreground/5 [&>a:hover]:text-foreground [&>a[aria-current]]:bg-foreground/10 [&>a[aria-current]]:text-foreground',
},
notFor: [
{
context: 'switching between views of the same content',
instead: 'nav.view',
},
{
context: 'controls that act on the content below them',
instead: 'layout.toolbar',
},
],
},