Contact Channels

A hairline grid of contact cells with copy-to-clipboard actions, single-key shortcuts, tooltips, and blueprint hover styling.

Installation

Contact Channels is published as a shadcn registry item. The CLI drops the file into your project, installs its dependencies, and adds any primitives it relies on.

$npx shadcn@latest add https://akoder.xyz/r/contact-channels.json

Install often? Register the namespace once in components.json and use the shorter form npx shadcn@latest add @akoder/contact-channels.

Usage

import { ContactChannels } from "@/components/ui/contact-channels";
import { Github, Mail } from "lucide-react";
 
const channels = [
  {
    id: "github",
    platform: "github",
    handle: "@octocat",
    href: "https://github.com",
    action: "external",
    icon: <Github className="size-4" />,
  },
  {
    id: "email",
    platform: "email",
    handle: "hi@example.com",
    action: "copy",
    copyValue: "hi@example.com",
    tooltip: "copy email",
    shortcutKey: "e",
    icon: <Mail className="size-4" />,
  },
];
 
export function Contact() {
  return <ContactChannels items={channels} columns={2} />;
}

Props

PropTypeDefaultNotes
itemsContactChannelItem[]requiredEach item: id, platform, handle, href, action ("copy" or "external"), copyValue, tooltip, shortcutKey, icon (a ReactNode).
columns1 | 2 | 32Grid column count. Collapses to a single column on small screens.
classNamestringExtra styling classes forwarded to the grid.

Notes & Features

Manual installation

Copy components/ui/contact-channels.tsx into your project. Ensure lucide-react is installed and that the shadcn tooltip primitive is available (install it with npx shadcn@latest add tooltip).