Selection
Blogging
Messaging
Map
Loading map...
Installation
$ pnpm dlx shadcn@latest add @mcpcn/map-carousel
Usage
import { MapCarousel, MapCarouselContent } from "@/components/ui/map-carousel";<MapCarousel>
<MapCarouselContent />
</MapCarousel>Composition
Use the following composition to build an MapCarousel:
MapCarousel
└── MapCarouselContentOpenUI Integration
Install the OpenUI React packages.
pnpm add @openuidev/react-lang zodAdd MapCarousel to a component library and map it to the installed component.
import { createLibrary, defineComponent } from "@openuidev/react-lang";
import { z } from "zod/v4";
import { MapCarousel, MapCarouselContent } from "@/components/ui/map-carousel";
const OpenUIMapCarousel = defineComponent({
name: "MapCarousel",
description:
"Interactive map with location markers and a draggable carousel of cards.",
props: z.object({}),
component: () => (
<MapCarousel>
<MapCarouselContent />
</MapCarousel>
),
});
export const map_carouselLibrary = createLibrary({
root: "MapCarousel",
components: [OpenUIMapCarousel],
});For richer generated compositions, define the child primitives separately and connect them with .ref fields. See Defining Components in the OpenUI documentation.
json-render Integration
Install the json-render React packages.
pnpm add @json-render/core @json-render/react zodAdd MapCarousel to a component catalog and map it to the installed component.
import { defineCatalog } from "@json-render/core";
import { defineRegistry } from "@json-render/react";
import { schema } from "@json-render/react/schema";
import { z } from "zod";
import { MapCarousel, MapCarouselContent } from "@/components/ui/map-carousel";
export const catalog = defineCatalog(schema, {
components: {
MapCarousel: {
props: z.object({}),
description:
"Interactive map with location markers and a draggable carousel of cards.",
},
},
});
export const { registry } = defineRegistry(catalog, {
components: {
MapCarousel: () => (
<MapCarousel>
<MapCarouselContent />
</MapCarousel>
),
},
});Use catalog.prompt() to constrain model output, then render the generated spec with the json-render React Renderer. See the json-render Quick Start for the provider and streaming setup.
API Reference
See the Base UI documentation for more information.