Warcraft Cursor
warcraftcn/cursorFreeComponent
A Warcraft-themed cursor component with faction-specific cursor styles
Live preview
live · rendered by the registry
Rendered by warcraftcn on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.warcraftcn.com/r/cursor.jsonSource
1import * as React from "react";2import { cva, type VariantProps } from "class-variance-authority";3import { cn } from "@/lib/utils";45import "@/components/ui/warcraftcn/styles/warcraft.css";67const cursorVariants = cva("", {8 variants: {9 faction: {10 default: "",11 orc: "wc-orc-cursor",12 elf: "wc-elf-cursor",13 human: "wc-human-cursor",14 undead: "wc-undead-cursor",15 },16 },17 defaultVariants: {18 faction: "default"19 },20});2122export interface CursorProps extends React.ComponentProps<"div">, VariantProps<typeof cursorVariants> {23 faction?: "default" | "orc" | "elf" | "human" | "undead";24}2526export const Cursor: React.FC<CursorProps> = ({27 className,28 faction = "default",29 children,30 ...props31}) => {32 const cursorClass = cursorVariants({ faction });3334 return (35 <div36 className={cn("wc-cursor", cursorClass, className)}37 {...props}38 >39 {children}40 </div>41 );42};
Files it writes
More from warcraftcn
All 16 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Warcraft Accordionaccordion | warcraftcn | Components | Free | 1 dep · 7 files | |
| Warcraft Avataravatar | warcraftcn | Components | Free | no deps · 7 files | |
| Warcraft Badgebadge | warcraftcn | Components | Free | no deps · 4 files | |
| Warcraft Buttonbutton | warcraftcn | Components | Free | no deps · 6 files | |
| Warcraft Cardcard | warcraftcn | Components | Free | no deps · 3 files | |
| Warcraft Checkboxcheckbox | warcraftcn | Components | Free | 1 dep · 12 files | |
| Warcraft Dropdown Menudropdown-menu | warcraftcn | Components | Free | 2 deps · 3 files | |
| Warcraft Inputinput | warcraftcn | Components | Free | no deps · 3 files |
