Event Confirmation
Order confirmation with event details, ticket delivery info, organizer follow, and social sharing.
Thanks for your order!
EVT-12345
You're going to
Summer Music Festival
2 Ticket sent to
customer@example.com
Date
Jan 20, 2024
Location
Central Park, New York
Don't miss out on events from
Live Nation
Created this event
Installation
$ pnpm dlx shadcn@latest add @mcpcn/event-confirmation
Usage
import {
EventConfirmation,
EventConfirmationContent,
} from "@/components/ui/event-confirmation";<EventConfirmation>
<EventConfirmationContent />
</EventConfirmation>Composition
Use the following composition to build an EventConfirmation:
EventConfirmation
└── EventConfirmationContentOpenUI Integration
Install the OpenUI React packages.
pnpm add @openuidev/react-lang zodAdd EventConfirmation to a component library and map it to the installed component.
import { createLibrary, defineComponent } from "@openuidev/react-lang";
import { z } from "zod/v4";
import {
EventConfirmation,
EventConfirmationContent,
} from "@/components/ui/event-confirmation";
const OpenUIEventConfirmation = defineComponent({
name: "EventConfirmation",
description:
"Order confirmation with event details, ticket delivery info, organizer follow, and social sharing.",
props: z.object({}),
component: () => (
<EventConfirmation>
<EventConfirmationContent />
</EventConfirmation>
),
});
export const event_confirmationLibrary = createLibrary({
root: "EventConfirmation",
components: [OpenUIEventConfirmation],
});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 EventConfirmation 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 {
EventConfirmation,
EventConfirmationContent,
} from "@/components/ui/event-confirmation";
export const catalog = defineCatalog(schema, {
components: {
EventConfirmation: {
props: z.object({}),
description:
"Order confirmation with event details, ticket delivery info, organizer follow, and social sharing.",
},
},
});
export const { registry } = defineRegistry(catalog, {
components: {
EventConfirmation: () => (
<EventConfirmation>
<EventConfirmationContent />
</EventConfirmation>
),
},
});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.