Contact Info
Contact information display
Overview
Renders a list of contact items, each with an icon determined by its type, a label, and a value. Email and phone values are automatically wrapped in mailto: and tel: links.
Usage
import { ContactInfo } from "@leanicon/web-builder-library";Default
All four item types: address, email, phone, and hours.
- Office123 Market Street, Suite 400, San Francisco, CA 94105
- Email[email protected]
- Phone+1 (555) 123-4567
- Business HoursMon–Fri, 9am–5pm PST
With social links
Pass socialLinks to display a row of platform links below the contact items.
- Office123 Market Street, Suite 400, San Francisco, CA 94105
- Email[email protected]
- Phone+1 (555) 123-4567
- Business HoursMon–Fri, 9am–5pm PST
Email and phone only
A minimal set with just email and phone items.
- Email[email protected]
- Phone+1 (555) 987-6543
Single item
A single contact item.
- Email[email protected]
With custom href
Override the auto-generated link via the href field — e.g. a mailto: with a subject or a Google Maps link for an address.
Minimal with social links
A single contact item paired with social links.
With social icons
Set showSocialIcons to render platform icons (from Lucide) instead of text labels. Supports twitter, linkedin, github, youtube, instagram, facebook, and discord.
Dark mode
- Office123 Market Street, Suite 400, San Francisco, CA 94105
- Email[email protected]
- Phone+1 (555) 123-4567
- Business HoursMon–Fri, 9am–5pm PST
With social links — dark mode
- Office123 Market Street, Suite 400, San Francisco, CA 94105
- Email[email protected]
- Phone+1 (555) 123-4567
- Business HoursMon–Fri, 9am–5pm PST
Email and phone only — dark mode
- Email[email protected]
- Phone+1 (555) 987-6543
Single item — dark mode
- Email[email protected]
With custom href — dark mode
Minimal with social links — dark mode
With social icons — dark mode
Props
Prop | Type | Default | Description |
|---|---|---|---|
|
| — | Contact detail items (required) |
|
| — | Optional row of social platform links |
|
|
| Render platform icons instead of text labels |
|
| — | Force light or dark mode |
|
| — | Additional CSS classes on root |
ContactInfoItem
Field | Type | Description |
|---|---|---|
|
| Determines the icon (MapPin, Mail, Phone, Clock) |
|
| Uppercase label above the value |
|
| Display text |
|
| Custom link — overrides auto-generated |
SocialLink
Field | Type | Description |
|---|---|---|
|
| Platform name (displayed) |
|
| Link URL |
|
| Accessible label (aria-label) |
Notes
- Email items automatically generate
mailto:links; phone items generatetel:links. - Provide
hrefon an item to override the auto-generated link (e.g., a custom mailto with subject or a Google Maps link for an address). - Social link text is capitalized via CSS when
showSocialIconsis off. showSocialIconsrenders Lucide icons for known platforms: twitter/x, linkedin, github, youtube, instagram, facebook, discord. Unknown platforms fall back to text.- Dark mode: pass
colorScheme="dark"or place inside a.darkancestor.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
items | ContactInfoItem[] | — | Yes | |
socialLinks | SocialLink[] | — | No | |
showSocialIcons | boolean | — | No | |
colorScheme | enum | — | No | |
className | string | — | No |