cursor
kibo-ui-registry/cursorFreeComponent
A cursor component, great for realtime interactive applications.
Live preview
live · rendered by the registry
Rendered by Kibo UI Registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.kibo-ui.com/r/cursor.jsonSource
1import { Children, type HTMLAttributes, type SVGProps } from "react";2import { cn } from "@/lib/utils";34export type CursorProps = HTMLAttributes<HTMLSpanElement>;56export const Cursor = ({ className, children, ...props }: CursorProps) => (7 <span8 className={cn("pointer-events-none relative select-none", className)}9 {...props}10 >11 {children}12 </span>13);1415export type CursorPointerProps = SVGProps<SVGSVGElement>;1617export const CursorPointer = ({ className, ...props }: CursorPointerProps) => (18 <svg19 aria-hidden="true"20 className={cn("size-3.5", className)}21 fill="none"22 focusable="false"23 height="20"24 viewBox="0 0 20 20"25 width="20"26 xmlns="http://www.w3.org/2000/svg"27 {...props}28 >29 <path30 d="M19.438 6.716 1.115.05A.832.832 0 0 0 .05 1.116L6.712 19.45a.834.834 0 0 0 1.557.025l3.198-8 7.995-3.2a.833.833 0 0 0 0-1.559h-.024Z"31 fill="currentColor"32 />33 </svg>34);3536export type CursorBodyProps = HTMLAttributes<HTMLSpanElement>;3738export const CursorBody = ({39 children,40 className,41 ...props42}: CursorBodyProps) => (43 <span44 className={cn(45 "relative ml-3.5 flex flex-col whitespace-nowrap rounded-xl py-1 pr-3 pl-2.5 text-xs",46 Children.count(children) > 1 && "rounded-tl [&>:first-child]:opacity-70",47 "bg-secondary text-foreground",48 className49 )}50 {...props}51 >52 {children}53 </span>54);5556export type CursorNameProps = HTMLAttributes<HTMLSpanElement>;5758export const CursorName = (props: CursorNameProps) => <span {...props} />;5960export type CursorMessageProps = HTMLAttributes<HTMLSpanElement>;6162export const CursorMessage = (props: CursorMessageProps) => <span {...props} />;
Files it writes
More from Kibo UI Registry
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| announcementannouncement | Kibo UI Registry | Components | Free | no deps | |
| avatar-stackavatar-stack | Kibo UI Registry | Components | Free | no deps | |
| bannerbanner | Kibo UI Registry | Components | Free | 2 deps | |
| calendarcalendar | Kibo UI Registry | Components | Free | 3 deps | |
| choiceboxchoicebox | Kibo UI Registry | Components | Free | 2 deps | |
| code-blockcode-block | Kibo UI Registry | Components | Free | 5 deps · 2 files | |
| color-pickercolor-picker | Kibo UI Registry | Components | Free | 3 deps | |
| comboboxcombobox | Kibo UI Registry | Components | Free | 2 deps |
