Skip to content

pastetaste

Stay Search Bar

FormsInteractionHeroes

A hotel booking bar: check-in and check-out in a two-month range calendar with a live hover preview, guest steppers and a check availability button.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/stay-search-bar.tsx.

npx shadcn@latest add https://pastetaste.com/r/stay-search-bar.json

Prompt

Install the pastetaste component "Stay Search Bar" (stay-search-bar) into this Next.js project and use it.

What it is: A hotel booking bar: check-in and check-out in a two-month range calendar with a live hover preview, guest steppers and a check availability button.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/stay-search-bar.json
   (it writes components/pastetaste/stay-search-bar.tsx; install any npm packages it reports).
2. Import it: import { StaySearchBar } from "@/components/pastetaste/stay-search-bar" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- value / defaultValue / onChange: Stay = { in:null, out:null, adults:2, kids:0 } — Controlled or uncontrolled { in, out, adults, kids }; dates are yyyy-mm-dd strings.
- onSearch: (v:Stay)=>void — Called by the button.
- today: string = visitor's date after mount — Fixed ISO date for demos and tests.
- maxAdults / maxKids: number = 4 / 3 — Stepper limits.
- cta: string = 'Check availability' — Button label.
- up: boolean = false — Open popovers above the bar.
- className / style: string / CSSProperties — On the root.

Live preview: https://pastetaste.com/c/stay-search-bar
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 7

PropTypeDefaultDescription
value / defaultValue / onChangeStay{ in:null, out:null, adults:2, kids:0 }Controlled or uncontrolled { in, out, adults, kids }; dates are yyyy-mm-dd strings.
onSearch(v:Stay)=>void-Called by the button.
todaystringvisitor's date after mountFixed ISO date for demos and tests.
maxAdults / maxKidsnumber4 / 3Stepper limits.
ctastring'Check availability'Button label.
upbooleanfalseOpen popovers above the bar.
className / stylestring / CSSProperties-On the root.
View all →