shadcn-labs

PDF Stack

Component

About

A flex layout container that arranges PDF document content vertically or horizontally with consistent spacing, alignment and wrapping, used to compose PDF pages built with React.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds PDF Stack to your project and fits it to your theme.

Code

How PDF Stack is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Stack from "@/components/ui/stack";

const itemStyle = {
  padding: "8px 16px",
  borderRadius: 6,
  background: "#f4f4f5",
  fontSize: 14,
  color: "#18181b",
};

export default function StackHorizontalDemo() {
  return (
    <div className="flex w-full items-center justify-center bg-background p-10">
      <Stack
        direction="horizontal"
        gap="lg"
        align="center"
        justify="between"
        style={{
          padding: 24,
          borderRadius: 8,
          border: "1px solid #e4e4e7",
          background: "#ffffff",
          width: 420,
        }}
      >
        <span style={itemStyle}>Alpha</span>
        <span style={itemStyle}>Beta</span>
        <span style={itemStyle}>Gamma</span>
      </Stack>
    </div>
  );
}

More by shadcn-labs

View all
  • Email Progress Bar

    Email Progress Bar

    4
  • Markdown Toolbar

    Markdown Toolbar

  • Rich Text Editor

    Rich Text Editor

  • Coupons With Centered Text

    Coupons With Centered Text

  • Stripe Receipt Email

    Stripe Receipt Email

  • Masonry Product Detail

    Masonry Product Detail

  • Post Card

    Post Card

  • Post List

    Post List