Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Schema Display
An API endpoint with its parameters and payloads.
POST/v1/projects/{projectId}/deployments
Create a deployment for the given project.
projectIdstringpathrequired
The project identifier
limitnumberquery
Maximum number of records to return
import {
SchemaDisplay,
SchemaDisplayContent,
SchemaDisplayDescription,
SchemaDisplayHeader,
SchemaDisplayMethod,
SchemaDisplayParameters,
SchemaDisplayPath,
SchemaDisplayRequest,
SchemaDisplayResponse,
} from "@/registry/default/shared/schema-display";
const parameters = [
{
description: "The project identifier",
location: "path" as const,
name: "projectId",
required: true,
type: "string",
},
{
description: "Maximum number of records to return",
location: "query" as const,
name: "limit",
type: "number",
},
];
const requestBody = [
{ name: "name", required: true, type: "string" },
{ description: "Optional summary", name: "description", type: "string" },
];
const responseBody = [
{ name: "id", required: true, type: "string" },
{ name: "name", required: true, type: "string" },
{ name: "createdAt", required: true, type: "string" },
];
export default function Particle() {
return (
<div className="w-full max-w-lg">
<SchemaDisplay
description="Create a deployment for the given project."
method="POST"
parameters={parameters}
path="/v1/projects/{projectId}/deployments"
requestBody={requestBody}
responseBody={responseBody}
>
<SchemaDisplayHeader>
<SchemaDisplayMethod />
<SchemaDisplayPath />
</SchemaDisplayHeader>
<SchemaDisplayDescription />
<SchemaDisplayContent>
<SchemaDisplayParameters />
<SchemaDisplayRequest defaultOpen={false} />
<SchemaDisplayResponse defaultOpen={false} />
</SchemaDisplayContent>
</SchemaDisplay>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/schema-display
Usage
import {
SchemaDisplayHeader,
SchemaDisplayMethod,
SchemaDisplayPath,
SchemaDisplayDescription,
SchemaDisplayContent,
SchemaDisplayParameter,
SchemaDisplayParameters,
SchemaDisplayProperty,
} from "@/components/schema-display";API Reference
| Export | Props |
|---|---|
SchemaDisplayHeader | <div> attributes |
SchemaDisplayMethod | Badge props |
SchemaDisplayPath | <span> attributes |
SchemaDisplayDescription | <p> attributes |
SchemaDisplayContent | <div> attributes |
SchemaDisplayParameter | <div> attributes, plus SchemaParameter |
SchemaDisplayParameters | Collapsible props |
SchemaDisplayProperty | <div> attributes, plus SchemaProperty |
SchemaDisplayRequest | Collapsible props |
SchemaDisplayResponse | Collapsible props |
SchemaDisplay | <div> attributes, plus its own options |
SchemaDisplayBody | <div> attributes |
SchemaDisplayExample | <pre> attributes |
Open the source under Manual above for the exact prop types.
On This Page