โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ ๐ shadcn/directory/ai-elements/node โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ
A composable node component for React Flow-based canvases with Card-based styling.
Copy Markdown Open
The Node component provides a composable, Card-based node for React Flow canvases. It includes support for connection handles, structured layouts, and consistent styling using shadcn/ui components.
The Node component is designed to be used with the Canvas component. See the Workflow demo for a full example.
ai-elements shadow manual
npx ai-elements@latest add node
import { Node, NodeHeader, NodeTitle, NodeDescription, NodeAction, NodeContent, NodeFooter, } from '@/components/ai-elements/node'
<Node handles={{ target: true, source: true }}> <NodeHeader> <NodeTitle>Node Title</NodeTitle> <NodeDescription>Optional description</NodeDescription> <NodeAction> <Button>Action</Button> </NodeAction> </NodeHeader> <NodeContent> Main content goes here </NodeContent> <NodeFooter> Footer content </NodeFooter> </Node>
| โข Built on shadcn/ui Card components for consistent styling | |-| | โข Automatic handle placement (left for target, right for source) | | โข Composable sub-components (Header, Title, Description, Action, Content, Footer) | | โข Semantic structure for organizing node information | | โข Pre-styled sections with borders and backgrounds | | โข Responsive sizing with fixed small width | | โซ Full TypeScript support with proper type definitions | | โข Compatible with React Flow's node system |
className?: string ...props?: ComponentProps<typeof CardContent>
Prop: className? Type: string
Prop: ...props? Type: ComponentProps<typeof CardFooter>
< Edge Customizable edge components for React Flow canvases
Panel > A styled panel component for React Flow-based canvases..
โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ