Esri, Maxar, OpenStreetMap
Ring the front desk any day between eight in the morning and midnight.
+30 22840 41200Directions to the houseA contact-and-location section on a real map: street and satellite tiles with a style switch, dragging, double-click and keyboard zoom that glides between levels, a pin for the hotel that drops in, icon markers for nearby beaches and stops that center the map when clicked, and a dark contact card with a large phone number and a directions link. Built without a map library.
A draggable map of the area around the hotel, with a pin that drops in for the house, icon markers for nearby places that center the map when clicked, a street and satellite switch, gliding zoom, and a dark contact card with a large phone number and a directions link, all without a map library.
Upgrade to Pro
Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.
Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.
Radix flavor
npx shadcn add "https://beste.dev/r/hotel30?email=YOUR_EMAIL&license_key=YOUR_KEY"Base UI flavor
npx shadcn add "https://beste.dev/r-base/hotel30?email=YOUR_EMAIL&license_key=YOUR_KEY"This installs the block to components/beste/block/hotel30.tsx. It has no other beste components or shadcn/ui primitives to pull in: the map, its controls and the contact card are all inside the one file.
The installed file exports hotel30Demo alongside the block: the exact props behind the preview above. Spread it to get a working section in one line.
import { Hotel30, hotel30Demo } from "@/components/beste/block/hotel30";
export default function Page() {
return <Hotel30 {...hotel30Demo} />;
}Then replace the demo with your own props. Written out, a trimmed setup looks like this:
import { Hotel30 } from "@/components/beste/block/hotel30";
import { Anchor, BusFront, Umbrella } from "lucide-react";
export default function Page() {
return (
<Hotel30
home={{ name: "Ostria", lat: 37.12053, lng: 25.22779 }}
center={{ lat: 37.12029, lng: 25.22564, zoom: 15 }}
places={[
{ name: "Old harbor", icon: Anchor, lat: 37.12481, lng: 25.23637 },
{ name: "Piperi beach", icon: Umbrella, lat: 37.12532, lng: 25.24495 },
{ name: "Bus to Parikia", icon: BusFront, lat: 37.11796, lng: 25.23465 },
]}
styles={[
{
label: "Map",
url: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",
maxZoom: 16,
invertInDark: true,
},
{
label: "Satellite",
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
maxZoom: 18,
},
]}
attribution="Esri, Maxar, OpenStreetMap"
card={{
heading: "Would you like to see the house before you book?",
body: "Ring the front desk any day between eight in the morning and midnight.",
phone: { label: "+30 22840 41200", href: "tel:+302284041200" },
link: { label: "Directions to the house", href: "https://www.google.com/maps/dir/?api=1&destination=37.12053,25.22779" },
}}
labels={{ zoomIn: "Zoom in", zoomOut: "Zoom out", reset: "Back to the house", map: "Map of Naoussa bay", styles: "Map style" }}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
home | Home | – | The hotel pin, with its name in a pill above the point |
center | Center | – | Starting view; falls back to home at zoom 15 |
places | Place[] | [] | Icon markers for nearby spots |
styles | MapStyle[] | [] | Tile sources; a switch appears when there are two or more |
attribution | string | – | Tile credit in the bottom right corner |
card | ContactCard | – | Dark contact card over the map |
labels | Labels | {} | Accessible labels for the map and its controls |
className | string | – | Extra classes for the outer <section> |
import type { LucideIcon } from "lucide-react";
type Home = {
name: string;
lat: number;
lng: number;
};
type Center = {
lat: number;
lng: number;
zoom: number;
};
type Place = {
name: string;
icon: LucideIcon;
lat: number;
lng: number;
};
type MapStyle = {
label: string;
url: string; // with {z}, {x} and {y} placeholders
maxZoom: number;
invertInDark?: boolean;
};
type ContactCard = {
heading: string;
body: string;
phone: { label: string; href: string };
link?: { label: string; href: string };
};
type Labels = {
zoomIn?: string;
zoomOut?: string;
reset?: string;
map?: string;
styles?: string;
};maxZoom) so tiles stay sharp on dense screens, and each tile fades in once loaded. Zoom is clamped between 12 and 17.+, = or - zoom. The side buttons zoom in, zoom out and return to the starting view.invertInDark is inverted and hue-rotated in dark mode, which turns a light gray street map dark; satellite imagery is left as is.