Panel

PreviousNext

AI-powered panel component.

Docs
ai-elementscomponent

Preview

Loading preview…
registry/default/ai-elements/panel.tsx
import { cn } from "@/lib/utils";
import { Panel as PanelPrimitive } from "@xyflow/react";
import type { ComponentProps } from "react";

type PanelProps = ComponentProps<typeof PanelPrimitive>;

export const Panel = ({ className, ...props }: PanelProps) => (
  <PanelPrimitive
    className={cn(
      "m-4 overflow-hidden rounded-md border bg-card p-1",
      className
    )}
    {...props}
  />
);

Installation

npx shadcn@latest add @ai-elements/panel

Usage

import { Panel } from "@/components/panel"
<Panel />