UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

8bitcn/8-bit Hover Card

Overlays
1 of 4
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

4 versions·4 librariesCompare all hover cards →

  • 8bitcn
  • Eldora UI
  • HextaUI
  • shadcn/ui

8-bit Hover Card

A simple 8-bit hover card component

npx shadcn@latest add https://www.8bitcn.com/r/hover-card.json
Open in v0 Docs Repo
Library
8bitcn
License
MIT
Stack
React · Tailwind CSS · radix
Packages
cnradix-ui
Also adds
hover-card, button
Size
98 lines
Demo
Written by UIPin: the library doesn’t ship a usage example, so the preview uses one of ours (in the code below).

Code

components/ui/8bit/hover-card.tsx

import type * as HoverCardPrimitive from "@radix-ui/react-hover-card";
import { type VariantProps, cva } from "class-variance-authority";

import { cn } from "@/lib/utils";

import {
  HoverCard as ShadcnHoverCard,
  HoverCardContent as ShadcnHoverCardContent,
  HoverCardTrigger as ShadcnHoverCardTrigger,
} from "@/components/ui/hover-card";

import "@/components/ui/8bit/styles/retro.css";

export const hoverCardVariants = cva("", {
  variants: {
    font: {
      normal: "",
      retro: "retro",
    },
  },
  defaultVariants: {
    font: "retro",
  },
});

export interface BitHoverCardProps
  extends React.ComponentProps<typeof HoverCardPrimitive.Content>,
    VariantProps<typeof hoverCardVariants> {}

function HoverCard({
  ...props
}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
  return <ShadcnHoverCard {...props} />;
}

function HoverCardTrigger({
  className,
  asChild = true,
  ...props
}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
  return (
    <ShadcnHoverCardTrigger
      className={cn(className)}
      asChild={asChild}
      {...props}
    />
  );
}

function HoverCardContent({
  children,
  className,
  font,
  ...props
}: BitHoverCardProps) {
  return (
    <ShadcnHoverCardContent
      className={cn(
        "relative",
        hoverCardVariants({
          font,
          className,
        })
      )}
      {...props}
    >
      {children}

      <div
        className="absolute inset-0 border-x-6 -mx-1.5 border-foreground dark:border-ring pointer-events-none"
        aria-hidden="true"
      />
      <div
        className="absolute inset-0 border-y-6 -my-1.5 border-foreground dark:border-ring pointer-events-none"
        aria-hidden="true"
      />
    </ShadcnHoverCardContent>
  );
}

export { HoverCard, HoverCardTrigger, HoverCardContent };

More like this

Shiny Button

Magic UI·Text effects

Button

shadcn/ui·Buttons

8-bit Toast

8bitcn·Feedback & loaders

8-bit sheet

8bitcn·Overlays

8-bit Popover

8bitcn·Overlays

Shimmer Button

Magic UI·Buttons

Carousel

HextaUI·Media & 3D

Border Trail

Motion Primitives·Cursor & effects

8-bit Dropdown Menu

8bitcn·Overlays

Safari

Magic UI·Media & 3D

8-bit Alert Dialog

8bitcn·Inputs & forms

Fuzzy Text

React Bits·Text effectsMIT+

Safari Browser

Eldora UI·Media & 3D

Side Panel

Cult UI·Other

Scroll Index

Kokonut UI·Text effects