Contact, links
betaEvery 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
Get in touch
WhatsApp is the fastest: we answer within the hour, every day from 10:00.
- 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
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):
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
| Field | Type | Limits | Guidance |
|---|---|---|---|
title | string | 2–48 chars | 'Get in touch', 'Talk to us'. |
sublineoptional | string | ≤ 160 chars | When you answer, and which way is fastest. |
links | object[] | 1–8 items | Phone and WhatsApp numbers in international format; email addresses; full URLs for the rest. |
links[].kind | "phone" | "whatsapp" | "email" | "instagram" | "facebook" | "tiktok" | "x" | "website" | ||
links[].value | string | 1–120 chars | The number, address or URL. |
links[].labeloptional | string | ≤ 32 chars |
Props
| Prop | Notes |
|---|---|
content | ContactLinksContent; the example when left out |
id | the section's id, for anchor links; "contact" by default |
headingLevel | 1, 2 or 3: the heading's tag; 2 by default |
className | on 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.