Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Escape Room Chat Block for React

A riddle thread against a ten-minute clock: type each answer, ask for hints on a 30-second cooldown, and watch the clues found list fill; the clock starts on a press and has a Pause.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Play a puzzle room in a chat, with this escape room chat for React with Base UI. A hairline frame with a plus mark on each corner holds a wide window of fixed height for Riddlehurst, an escape-room game: the game master, Fitzroy Penn, asks a riddle, and the composer is your answer line. The page checks what you type against a typed list of accepted answers, ignoring case, accents and extra spaces, and a correct answer posts the next clue and ticks the "Clues found" list beside the thread. "Hint" posts the next of three hints and then waits 30 seconds; the room clock starts at 10:00 when you press "Start the room", has a visible Pause, and stops at 0:00. Under reduced motion nothing ticks. The composer's Shine Button, the only colored control, submits your answer. It's the starting point for a puzzle game, a scavenger hunt or a guided quiz in a chat.

FAQ

What stays in the page, and how do I make it real?

Everything. The five riddles, their accepted answers and their hints are typed in this file, and the check runs in your browser. Nothing is sent. To wire it for real, send each answer to your game server where the code says so, keep the accepted answers there so they are not in the page, and post the server's verdict as the master's reply.

How does the clock work?

It opens on 8:42, paused, because the demo starts on clue 3. Start the room resets it to 10:00 and starts one tick a second, Pause stops it and Resume continues, and it never goes below 0:00 or beyond ten minutes. The interval is cleared whenever it is paused or the block unmounts.

What happens under reduced motion?

Nothing ticks. Start the room shows the full 10:00, the Pause button is not needed and is hidden, and Hint has no cooldown, so the next hint is one press away.

How do hints work?

Each clue has three. Hint posts the next as a message from the game master, then waits 30 seconds on the button, which counts down in words. A new clue resets the hints, and the foot of the clue list says how many you used.

How does it look on a phone?

A two-way switch shows Chat or Clues with how many are found. The clock stays in the top bar, Hint and Start the room stay in the bar under it, and the window keeps its height.