Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Day and Dusk Real Estate Gallery Block for React

A listing gallery for a townhouse: a stage that goes room by room, a Day and Dusk switch that lights every window and lamp, and the listing's price, floor area and a Book a viewing button.

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

A real estate gallery for React with Base UI. A 3:2 stage shows one picture of a townhouse: the front of the house, the living room, the kitchen, the bedroom or the garden, chosen from a toggle group under it. Next to the group, a Day and Dusk switch turns every picture to evening: the sky sinks, windows and lamps light up, pendants and bedside lamps pool their light. At the end of the split are the listing's facts in a definition list (price, price per square metre, bedrooms and bathrooms, floor area in square metres and square feet, and the room on the stage) and the Shine Button, "Book a viewing". On a phone the facts follow under a rule. All five pictures are drawn in the theme's greys, never photographed. It's built from Guides, Toggle Group, Switch and Shine Button, with CSS transitions for the entrance. For lettings, new-build sales, holiday homes and any place worth seeing twice.

FAQ

How does the Dusk switch work?

Every picture is drawn from typed data and a dusk flag. With the flag on, the picture uses a darker ground, the kit lights the windows, fanlights, lamps and pendants, and a moon and stars replace the sun. The same room is drawn both ways, so with photographs you would keep a day and a dusk image per room and choose one in sceneOf's place.

How do I add a room?

Add an entry to ROOMS (an id, label, title, metres, a day and a dusk description) and write its picture: each room is a small function in the scene kit that returns the picture as paths. The toggle group takes more items; on a phone the labels shrink, so keep them to one short word.

Where do the numbers come from?

The listing is typed once in LISTING (price, area, bedrooms, bathrooms). The price per square metre, the area in square feet and each room's area under the stage are calculated from it, so changing a number changes everywhere it is shown.

What does Book a viewing do?

It marks the request as saved in this demo (the label changes and a polite line says so) and sends nothing. Connect it to your booking form in request.

Which keys work?

Tab goes to the rooms, then the switch, then the button. In the rooms group the left and right arrow keys move between rooms and Enter or Space chooses one; Space flips the switch. A polite line announces the room and whether it is day or dusk.

Why doesn't the page move when I change room?

The stage is a fixed 3:2 box, every picture fills it, and the fact rows are single lines, so changing a room or the time of day never changes the block's height.

  • Pro

    Product Showcase Gallery

    Stage and thumbnails

    A product viewer for a running shoe: a vertical rail of four angles beside a 4:3 stage, three finishes that recolour every picture, and price, sizes and stock with an Add to bag button.

  • Pro

    Split View Gallery

    Stage and thumbnails

    An asset-review split: a listbox of eight files with small drawings at the start, the chosen file's preview and details at the end, and a divider you drag or arrow to resize.

  • Pro

    Thumbnail Strip Gallery

    Stage and thumbnails

    A viewer for a lighting shop: a framed 4:3 stage with Previous and Next, its caption beside it, and a scrollable strip of twelve thumbnails whose arrow keys step through the pictures.

  • Pro

    A photo essay of five framed pictures in alternating rows, with a Short and Full switch: Short shows each title, Full adds the place, date, credit and a two-sentence story.

  • Pro

    Lightbox Gallery

    Stage and thumbnails

    Nine pictures of a photography studio's year on shared hairlines, a featured frame and a caption under each, where every frame opens one viewer dialog with the whole picture, its credit, Previous and Next, a counter, arrow keys and a swipe.

  • Pro

    Tabbed Product Views Hero

    Interactive demos

    A centred showcase hero with a Shine Button and an outline action over a pill tab switch and one wide product window in a hairline frame that shows a chat, a terminal session or a docs page.