Skip to content
← Component pinboard

signature primitive

StickerStack

Navigate a bounded stack without rendering the whole collection.

alpha@scout-ui/react
Live · bounded

StickerStack preview

01Start with one loud idea.
Code

Deterministic React output

Generated code

Plain TSX ready
"use client";

import { StickerStack } from "@scout-ui/react";
import "@scout-ui/react/styles.css";

const items = [
  { id: "shape", title: "Give the idea a shape." },
  { id: "ship", title: "Ship the bounded version." },
  { id: "learn", title: "Learn from real use." },
  { id: "repeat", title: "Keep what sticks." },
] as const;

export default function StickerStackExample() {
  return (
    <StickerStack
      items={items}
      getKey={(item) => item.id}
      renderItem={(item) => (
        <article>
          <h2>{item.title}</h2>
        </article>
      )}
    />
  );
}

Open full playground →

Search terms: StickerStack, @scout-ui/react, stack, cards, swipe, carousel

Install

Scout UI is in alpha preflight and is not represented here as a public npm release. Inside the workspace, consume the frozen package contract by name.

tsx
import { StickerStack } from "@scout-ui/react";
import "@scout-ui/react/styles.css";

Usage

Use Stack for a small ordered collection with stable keys, bounded visibleCount, and ordinary previous/next controls.

tsx
"use client";

import { StickerStack } from "@scout-ui/react";
import "@scout-ui/react/styles.css";

const items = [
  { id: "shape", title: "Give the idea a shape." },
  { id: "ship", title: "Ship the bounded version." },
  { id: "learn", title: "Learn from real use." },
  { id: "repeat", title: "Keep what sticks." },
] as const;

export default function StickerStackExample() {
  return (
    <StickerStack
      items={items}
      getKey={(item) => item.id}
      renderItem={(item) => (
        <article>
          <h2>{item.title}</h2>
        </article>
      )}
    />
  );
}

Examples

Inspect a complete authored setting, then adapt it without copying private implementation details.

Open the related recipe →

API

StickerStackProps<T> is part of the frozen alpha surface. The table below is generated from the same typed schema that powers presets, preview, Copy Code, share URLs, and Copy AI Prompt.

PropControlDefaultContract
indexrange0Choose one of the four fixed authored demo cards.
visibleCountsegmented3Bound rendered layers from two to five.
loopbooleanfalseAllow navigation across collection boundaries.
axissegmented"x"Choose horizontal or vertical gesture geometry.
dragbooleanfalseAdd axis-locked swipe while preserving buttons.
keyboardbooleanfalseEnable documented arrow navigation on the focused stack.
disabledbooleanfalseKeep state understandable while navigation is unavailable.
reducedMotionselect"system"Commit direct reorder without travel.

Presets

  • DefaultFinite button-operated stack.
  • InteractiveKeyboard and drag enhancements.
  • VerticalA direct vertical stack with reduced motion.

Accessibility

Buttons always work. Optional arrow-key behavior applies only when the stack itself is focused and never traps normal focus movement.

Motion and reduced motion

The semantic index changes directly without travel; deterministic resting depth may remain.

Touch and small screens

Swipe is an enhancement with axis intent; perpendicular page scrolling wins before stack intent is established.

SSR and React Server Components

The leaf is client-marked because it owns state and gesture behavior. renderItem callbacks belong in a consumer Client Component.

Performance

Only visible cards plus at most one outgoing card render; drag uses refs/CSS variables and rapid navigation is synchronously gated.

Constraints

Do not use Stack for hundreds of records, primary navigation, dense forms, or content that must be simultaneously visible.

Source

Inspect the implementation and tests in the public Scout UI repository. Code uses MIT licensing; official artwork uses its separately documented asset license.

Open the public source file ↗