Skip to content
New

Contact, links

beta

Every way to reach the business as a grid of cards: WhatsApp, phone, email and social profiles, each one tap away.

npx rasengan-ui add contact-links
Use it
Near the end of a local business's page, so people can reach it the way they prefer.
Avoid it
A long contact form is needed: link to it instead.
Built with
Tailwind classes and Lucide icons
Pairs with
Footer, columns

Installation

Terminal
npx rasengan-ui add contact-links

It installs into components/blocks/contact-links/, with what it uses (no component, Lucide icons) and lib/blocks.ts.

Usage

Without content, the block shows its example. Pass your own, typed by the block's schema, from a content file (here, the example with one field changed):

app/_routes/index.page.tsx
import { ContactLinks } from "@/components/blocks/contact-links";
import { home } from "@/content/home";
 
export default function Home() {
  return <ContactLinks content={home.contact} />;
}
content/home.ts
import { example, type ContactLinksContent } from "@/components/blocks/contact-links";
 
export const home = {
  contact: {
    ...example,
    title: "Talk to us",
  } satisfies ContactLinksContent,
};

Each kind makes its own link: phone a call, whatsapp a chat (wa.me), email a message, the others the profile's URL. Icons are generic, as Lucide carries no brand logos.

Content

FieldTypeLimitsGuidance
titlestring2–48 chars'Get in touch', 'Talk to us'.
sublineoptionalstring≤ 160 charsWhen you answer, and which way is fastest.
linksobject[]1–8 itemsPhone and WhatsApp numbers in international format; email addresses; full URLs for the rest.
links[].kind"phone" | "whatsapp" | "email" | "instagram" | "facebook" | "tiktok" | "x" | "website"
links[].valuestring1–120 charsThe number, address or URL.
links[].labeloptionalstring≤ 32 chars

Props

PropNotes
contentContactLinksContent; the example when left out
idthe section's id, for anchor links; "contact" by default
headingLevel1, 2 or 3: the heading's tag; 2 by default
classNameon the <section>, for spacing

Accessibility

  • Each card is one link, named by its label and the number or address.
  • Links that leave the site open in a new tab.