Map Carousel
manifest-ui/map-carouselFreeBlock
Interactive map with location markers and a draggable carousel of cards.
Install it
npx shadcn@latest add https://ui.manifest.build/r/map-carousel.jsonSource
1'use client'23import { Button } from '@/components/ui/button'4import { Checkbox } from '@/components/ui/checkbox'5import { cn } from '@/lib/utils'6import { ChevronDown, MapPin, Maximize2, SlidersHorizontal, X } from 'lucide-react'7import { useCallback, useEffect, useRef, useState } from 'react'8import { demoMapLocations, demoMapCenter, demoMapZoom } from './demo/map'910/**11 * Represents a location/hotel to display on the map.12 * @interface Location13 * @property {string} [name] - Location name14 * @property {string} [subtitle] - Subtitle (e.g., neighborhood)15 * @property {string} [image] - Location image URL16 * @property {number} [price] - Price value17 * @property {string} [priceLabel] - Full price text (e.g., "$284 total Jan 29 - Feb 1")18 * @property {string} [priceSubtext] - Additional price info (e.g., "USD • Includes taxes")19 * @property {number} [rating] - Rating value (e.g., 8.6)20 * @property {[number, number]} coordinates - Lat/lng coordinates21 * @property {string} [link] - External link URL22 */23export interface Location {24 name?: string25 subtitle?: string26 image?: string27 price?: number28 priceLabel?: string29 priceSubtext?: string30 rating?: number31 coordinates: [number, number] // [lat, lng]32 link?: string33}3435/**36 * Available map tile styles.37 * @typedef {"voyager" | "voyager-smooth" | "positron" | "dark-matter" | "openstreetmap"} MapStyle38 */39export type MapStyle =40 | 'voyager'41 | 'voyager-smooth'42 | 'positron'43 | 'dark-matter'44 | 'openstreetmap'4546// Filter configuration for fullscreen variant47/**48 * Configuration for a single filter section.49 * @interface FilterSectionConfig50 */51export interface FilterSectionConfig {52 /** Unique identifier for this filter (used in filter state). */53 id: string54 /** Display title for the filter section. */55 title: string56 /** Available options for this filter. */57 options: string[]58 /**59 * Function to check if a location matches the selected filter values.60 * @param location - The location to check61 * @param selectedValues - Currently selected filter values62 * @returns true if location matches, false otherwise63 */64 matchFn?: (location: Location, selectedValues: string[]) => boolean65}6667/** State tracking selected values for each filter by id. */68export type FilterState = Record<string, string[]>6970const createEmptyFilterState = (filters: FilterSectionConfig[]): FilterState => {71 return filters.reduce((acc, filter) => {72 acc[filter.id] = []73 return acc74 }, {} as FilterState)75}7677// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Manifest UI
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Amount Inputamount-input | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Chat Conversationchat-conversation | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Contact Formcontact-form | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Date & Time Pickerdate-time-picker | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Cardevent-card | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Confirmationevent-confirmation | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Detailevent-detail | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Event Listevent-list | Manifest UI | Blocks | Free | 3 deps · 2 files |
