labeled-handle
simple-ai/labeled-handleFreeComponent
simple-ai publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by simple-ai on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://simple-ai.dev/r/labeled-handle.jsonSource
1"use client";23import type { HandleProps } from "@xyflow/react";4import React from "react";5import { cn } from "@/lib/utils";67import { BaseHandle } from "@/registry/ui/flow/base-handle";89const flexDirections = {10 top: "flex-col",11 right: "flex-row-reverse justify-end",12 bottom: "flex-col-reverse justify-end",13 left: "flex-row",14};1516const LabeledHandle = React.forwardRef<17 HTMLDivElement,18 HandleProps &19 React.HTMLAttributes<HTMLDivElement> & {20 title: string;21 handleClassName?: string;22 labelClassName?: string;23 }24>(25 (26 {27 className,28 labelClassName,29 handleClassName,30 title,31 position,32 ...props33 },34 ref,35 ) => (36 <div37 ref={ref}38 title={title}39 className={cn(40 "relative flex items-center",41 flexDirections[position],42 className,43 )}44 >45 <BaseHandle46 position={position}47 className={handleClassName}48 {...props}49 />50 {/* biome-ignore lint/a11y/noLabelWithoutControl: Needed */}51 <label className={cn("px-3 text-foreground", labelClassName)}>52 {title}53 </label>54 </div>55 ),56);5758LabeledHandle.displayName = "LabeledHandle";5960export { LabeledHandle };
What it pulls in
npm packages
Files it writes
More from simple-ai
All 77 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| base-handlebase-handle | simple-ai | Components | Free | 1 dep | |
| base-nodebase-node | simple-ai | Components | Free | no deps | |
| Chat Inputchat-input | simple-ai | Components | Free | 7 deps | |
| Chat Messagechat-message | simple-ai | Components | Free | no deps | |
| Chat Message Areachat-message-area | simple-ai | Components | Free | 1 dep | |
| Chat Suggestionschat-suggestions | simple-ai | Components | Free | no deps | |
| Editable Handleeditable-handle | simple-ai | Components | Free | 1 dep | |
| Generate Text Nodegenerate-text-node | simple-ai | Components | Free | 1 dep |
