Patterns · Marketing
Contact card
Puts a named person, their hours and a direct phone line in front of the customer. Use the card on marketing and help pages, the inline row at the bottom of customer-area pages.
import { ContactCard } from '@statix/ui/contact-card';Playground
Jonas Weber
Your contact at Statix
Mon to Fri, 8 to 20
<ContactCard
name="Jonas Weber"
role="Your contact at Statix"
hours="Mon to Fri, 8 to 20"
title="Questions or a broken website?"
phone="040 468 970 790"
email="support@statix.io"
/>Examples
Card
Eyebrow, person, a full-width dark phone button and an outline message button. Hours and response time go underneath.
Your contact
Jonas Weber
Engineer, knows your website
Mon to Fri, 8 to 20.
Email replies usually within four hours.
<script lang="ts">
import { ContactCard } from '@statix/ui/contact-card';
</script>
<ContactCard
eyebrow="Your contact"
name="Jonas Weber"
role="Engineer, knows your website"
hours="Mon to Fri, 8 to 20."
note="Email replies usually within four hours."
phone="040 468 970 790"
email="support@statix.io"
class="w-full max-w-[360px]"
/>Inline support row
The row at the bottom of the customer area start page. Extra buttons go in actions, the note explains what happens next.
Questions or a broken website?
Jonas Weber helps. Mon to Fri, 8 to 20.
Pick a website and a backup first. Nothing changes yet.
<script lang="ts">
import { ContactCard } from '@statix/ui/contact-card';
import { Button } from '@statix/ui/button';
import ArrowRightIcon from '@lucide/svelte/icons/arrow-right';
</script>
<div class="px-6 py-8 tablet:px-10">
<ContactCard
variant="inline"
name="Jonas Weber"
title="Questions or a broken website?"
description="Jonas Weber helps. Mon to Fri, 8 to 20."
phone="040 468 970 790"
note="Pick a website and a backup first. Nothing changes yet."
class="border-t border-border pt-8"
>
{#snippet actions()}
<Button href="#help" variant="outline">
Help
<ArrowRightIcon data-icon="inline-end" />
</Button>
<Button href="#restore" variant="outline">
Restore website
<ArrowRightIcon data-icon="inline-end" />
</Button>
{/snippet}
</ContactCard>
</div>Phone only
Leave out email when you want calls. Children add a short line above the buttons.
Jonas Weber
Moves your website to Statix
Call before you cancel your old host. We plan the move with you.
Mon to Fri, 8 to 20
<script lang="ts">
import { ContactCard } from '@statix/ui/contact-card';
</script>
<ContactCard
name="Jonas Weber"
role="Moves your website to Statix"
phone="040 468 970 790"
hours="Mon to Fri, 8 to 20"
class="w-full max-w-[400px] bg-secondary"
>
<p class="text-body text-ink-2">
Call before you cancel your old host. We plan the move with you.
</p>
</ContactCard>Guidelines
Do
- Name a real person. "Jonas Weber helps" works better than "Our support team".
- Always show the hours next to the phone number.
- Keep the inline row on every customer-area page that can go wrong for the customer.
Don't
- Don’t use a stock photo as the portrait. Use initials until you have a real one.
- Don’t add more than two extra actions to the inline row.
Accessibility
- The phone and email buttons are real tel: and mailto: links named by their visible text.
- The avatar is aria-hidden because the name is right next to it.
- The component has no landmark or heading of its own. Wrap it in a section with a heading where it stands alone.
API reference
ContactCard
renders<div> and accepts its attributes| Prop | Type | Default |
|---|---|---|
variant | 'card' | 'inline' card: standalone white card. inline: support row for the bottom of a page. | 'card' |
name * | string Name of the contact person. | – |
role | string Role under the name (card). | – |
eyebrow | string Small muted label at the top of the card, for example "Your contact". | – |
hours | string Support hours, for example "Mon to Fri, 8 to 20". | – |
title | string Headline of the inline variant. | – |
description | string Line under the inline headline. Defaults to name and hours. | – |
phone | string Phone number as displayed. Renders the call button. | – |
phoneHref | string tel: link. Defaults to the number without spaces. | – |
email | string Email address. Renders the email button. | – |
emailLabel | string Label of the email button. | 'Send a message' |
avatarSrc | string Portrait URL. Initials show without it. | – |
initials | string Fallback initials. Derived from name. | – |
note | string Muted line under the buttons, or under the hours on the card. | – |
actions | Snippet More buttons after phone and email. | – |
children | Snippet Extra content above the buttons (card) or under them (inline). | – |
ref bind | HTMLDivElement | null The root element. | – |
class | ClassValue Merged with the variant classes; yours win. | – |
| Data attribute | Meaning |
|---|---|
data-slot="contact-card" | The root. |
data-variant | card or inline. |
data-slot="contact-card-avatar" | The portrait or initials. |
contactCardVariants
The tailwind-variants function (slots base, person, avatar, actions, note).