esokbumi-project

Bottle Page Not Found

Component 4

About

A calm 404 page: a message in a bottle bobbing on drifting waves. Pure SVG and CSS with no dependencies. Follows your theme tokens, turns into a night sea in dark mode, and respects reduced motion.

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

Code

How Bottle Page Not Found is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

// This is a file with a demo for your component
// That's what users will see in the preview
// Create new files in this directory to add more demos

import { BottleNotFound } from "@/components/ui/bottle-page-not-found";

// The demo loads Fraunces + Geist Mono to match the original design. In your app
// the component uses your theme's font-serif / font-mono instead.
const FONTS = `
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..500,0..100,0..1&family=Geist+Mono:wght@400;500&display=swap");
.bnf-demo .font-serif { font-family: "Fraunces", Georgia, serif; font-variation-settings: "opsz" 12, "SOFT" 0, "WONK" 1; }
.bnf-demo .font-mono { font-family: "Geist Mono", ui-monospace, Menlo, monospace; }
`;

// Live controls on 21st.dev: every key below becomes a field or toggle.
const settings = {
  eyebrow: "404 · still on its way",
  title: "This page hasn't washed ashore yet.",
  description: "Maybe it's still being written, like the message in this bottle. Try again a little later, or head back home.",
  path: "/pricing/enterprise",
  showPath: true,
  showActions: true,
  fullScreen: true,
};

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="bnf-demo">
      <style>{FONTS}</style>
      <BottleNotFound
        eyebrow={s.eyebrow}
        title={s.title}
        description={s.description}
        path={s.showPath ? s.path : undefined}
        fullScreen={s.fullScreen}
        actions={
          s.showActions ? (
            <>
              <a
                href="/"
                className="inline-flex h-10 items-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
              >
                Back home
              </a>
              <a
                href="mailto:hello@example.com"
                className="inline-flex h-10 items-center rounded-md border border-border px-4 text-sm font-medium transition-colors hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
              >
                Report a broken link
              </a>
            </>
          ) : undefined
        }
      />
    </div>
  );
}