Aashir Zayd

Pocket Pass

Component 6

About

1 of 1 — Pocket Pass: a stitched leather sleeve of cards you can actually pull. Drag a card out on a spring and it tilts with your hand while the rest sink back; each card shows a balance meter, stats and a masked key you can copy. Flick it back or press Esc. Onyx, saddle, oxblood and sage leather, grain and stitching that catch the cursor light, keyboard support, scales to any width.

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

Code

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

Usage.tsx

"use client";

import * as React from "react";
import { PocketPass, type PocketPassItem } from "@/components/ui/pocket-pass";

const CARDS: PocketPassItem[] = [
  {
    id: "kimi-k3",
    name: "Kimi K3",
    provider: "Moonshot AI",
    color: "#1f4f8f",
    usage: { left: 3_420_000, total: 5_000_000 },
    stats: [
      { label: "Context", value: "256K" },
      { label: "Input", value: "$0.60/M" },
      { label: "Output", value: "$2.50/M" },
    ],
    secret: "tp_live_8c1d0e7a9b3f",
  },
  {
    id: "kimi-k31-pro",
    name: "Kimi K3.1 Pro",
    provider: "Moonshot AI",
    color: "#235a9e",
    usage: { left: 910_000, total: 2_000_000 },
    stats: [
      { label: "Context", value: "512K" },
      { label: "Input", value: "$1.20/M" },
      { label: "Output", value: "$4.80/M" },
    ],
    secret: "tp_live_51aa02c4d9e1",
  },
  {
    id: "glm-53",
    name: "GLM 5.3",
    provider: "Z.ai",
    color: "#1f78e8",
    usage: { left: 7_800_000, total: 10_000_000 },
    stats: [
      { label: "Context", value: "200K" },
      { label: "Input", value: "$0.40/M" },
      { label: "Output", value: "$1.60/M" },
    ],
    secret: "tp_live_c0ffee42b7a0",
  },
  {
    id: "glm-53-flash",
    name: "GLM 5.3 Flash",
    provider: "Z.ai",
    color: "#2b8af5",
    usage: { left: 14_200_000, total: 20_000_000 },
    stats: [
      { label: "Context", value: "128K" },
      { label: "Input", value: "$0.05/M" },
      { label: "Output", value: "$0.20/M" },
    ],
    secret: "tp_live_7e2b19d0aa5c",
  },
  {
    id: "deepseek-v41-flash",
    name: "DeepSeek V4.1 Flash",
    provider: "DeepSeek",
    color: "#8b3fd6",
    usage: { left: 1_150_000, total: 8_000_000 },
    stats: [
      { label: "Context", value: "164K" },
      { label: "Input", value: "$0.07/M" },
      { label: "Output", value: "$0.28/M" },
    ],
    secret: "tp_live_d33p5eek41f0",
  },
];

const LEATHERS = [
  { id: "auto", name: "Auto" },
  { id: "onyx", name: "Onyx" },
  { id: "saddle", name: "Saddle" },
  { id: "oxblood", name: "Oxblood" },
  { id: "sage", name: "Sage" },
] as const;

type Leather = (typeof LEATHERS)[number]["id"];

export default function Demo() {
  const [leather, setLeather] = React.useState("auto" as Leather);

  const chip = (on: boolean) =>
    "h-8 rounded-full px-3 text-[12px] font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-sky-400 " +
    (on ? "bg-neutral-900 text-white dark:bg-white dark:text-neutral-900" : "text-neutral-600 hover:bg-black/5 dark:text-neutral-300 dark:hover:bg-white/10");

  return (
    <div className="relative flex min-h-screen w-full flex-col items-center justify-center gap-8 overflow-clip bg-[#ece6dc] px-5 py-16 dark:bg-[#0b0b0c]">
      <div className="w-full max-w-[420px]">
        <PocketPass items={CARDS} leather={leather} />
      </div>
      <div className="flex flex-col items-center gap-3">
        <div className="flex flex-wrap items-center justify-center gap-1 rounded-full border border-black/10 bg-white/70 p-1 backdrop-blur-xl dark:border-white/10 dark:bg-neutral-900/70">
          {LEATHERS.map((l) => (
            <button key={l.id} type="button" className={chip(leather === l.id)} aria-pressed={leather === l.id} onClick={() => setLeather(l.id)}>
              {l.name}
            </button>
          ))}
        </div>
        <p className="text-center text-[11px] text-neutral-500">1 of 1 · drag a card out of the pocket · flick it back or press Esc</p>
      </div>
    </div>
  );
}

More by Aashir Zayd

View all
  • Creator Dashboard

    Creator Dashboard

    94
  • Card Fan

    Card Fan

    80
  • Venue Ticketing

    Venue Ticketing

    59
  • Uptime Pet

    Uptime Pet

    50
  • Container Loader

    Container Loader

    38
  • Clipboard Hero

    Clipboard Hero

    35
  • Dot Matrix Toaster

    Dot Matrix Toaster

    34
  • Punch Card Input

    Punch Card Input

    34

Explore more

Part of MouseUI — browse the full library on 21st.dev.