💾
Retro90s UIv1.0.0

Guestbook

A classic 90s guestbook component with form and entries display.

Preview

Try signing the guestbook below! (entries are stored in memory)

Sign My Guestbook!

0/500

Recent Entries (3)

W
WebMaster2000[website]

Cool site! Added to my bookmarks!

C
CyberSurfer99

Love the retro vibes! Keep it up!

N
NetNinja[website]

Found your site through AltaVista. Very rad!

Installation

npx shadcn@latest add https://retro90s.dev/r/guestbook.json

Usage

import { Guestbook, GuestbookEntry } from "@/components/ui/guestbook"

export function MyGuestbook() {
  const [entries, setEntries] = useState<GuestbookEntry[]>([])

  const handleSubmit = (entry) => {
    const newEntry = {
      ...entry,
      id: Date.now().toString(),
      timestamp: new Date(),
    }
    setEntries([newEntry, ...entries])
  }

  return (
    <Guestbook
      entries={entries}
      onEntrySubmit={handleSubmit}
      showWebsiteField
    />
  )
}

Features

  • Windows 95 style form fields
  • Name and message fields (required)
  • Optional email field
  • Optional website field with links
  • Character counter for messages
  • Animated submit button
  • Timestamped entries display
  • Avatar with initial letter

Props

PropTypeDefault
entriesGuestbookEntry[][]
onEntrySubmit(entry) => void-
maxMessageLengthnumber500
showEmailFieldbooleanfalse
showWebsiteFieldbooleantrue
titlestring"Sign My Guestbook!"

GuestbookEntry Type

interface GuestbookEntry {
  id: string
  name: string
  message: string
  timestamp: Date
  email?: string
  website?: string
}