Marketing sectionsContactDetails
Searchastronomic.dev# ContactDetails
To show your details large, the email first, when you do not want a form.
Static: no JavaScript.
## Usage
```astro
import ContactDetails from "@astronomic/ui-pro/components/ContactDetails.astro";
```
## Examples
### The email, large
The email leads on a row of its own, large (the subhead role, sized to the section, a step under the heading), then the phone, address and hours in a row that wraps: side by side in a wide section, one under another on a phone. No form, so no endpoint is needed.
```astro
---
import ContactDetails from "@astronomic/ui-pro/components/ContactDetails.astro";
// Made-up details: a reserved .example address, and a US number from the 555-0100 to 555-0199 range kept for fiction.
const hours = [
{ label: "Mon to Thu", value: "9 a.m. to 5:30 p.m." },
{ label: "Fri", value: "9 a.m. to 3 p.m." },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<ContactDetails
heading="Say hello"
text="Write, call or come by the studio. A person reads every message."
email="hello@astronomic.example"
phone="+1 (312) 555-0147"
address={["Astronomic", "12 Orbit Lane", "Example City, IL 60601"]}
hours={hours}
/>
</div>
```
## Props
### ContactDetails
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading, in the title role in display type. Without it there is no section and no header: a plain <div> holds only the body. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>: exactly two asterisks around text with no space inside, as in "Built for *the long run*". Any other asterisks show as typed. Off by default, so the heading shows as typed. How the <em> looks is the theme's. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)" or "©2026", in small muted type. It sits beside the heading, outside it, so the heading's name stays plain. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects": the mark is then hidden from screen readers and this is read in its place. Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. Channel titles sit one level under it. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent (inline-flex, a float, fit-content) it collapses, so give it a width there. |
| `email` | `string` | None | Your email address, shown as a mailto: link. It breaks after the @ first in a narrow column; only a part too long for the column breaks inside it. |
| `phone` | `string` | None | Your phone number, shown as written, such as "+1 (312) 555-0147". The tel: link keeps only the digits and a leading +. |
| `address` | `string[]` | None | Your address, one line each. It keeps its lines, in <address>. |
| `hours` | `ContactHours[]` | None | Opening hours, one { label, value } per line (ContactHours), such as { label: "Mon to Fri", value: "9 a.m. to 5:30 p.m." }. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
Any other attribute goes on the <section>, or on the <div> without a heading.
## Accessibility
- With a heading, renders a <section> named by it, so it is a region landmark. The heading id is unique on the page.
- Without a heading, renders a plain <div>. Put your own heading above it.
- The details are a description list (<dl>): each label is its term, so a screen reader reads "Email, hello@astronomic.example". What you leave out leaves no term.
- The email is a mailto: link that reads the address. It breaks after the @, so it is never split in the middle of a name.
- The phone is a tel: link, shown as you write it; the link keeps only the digits and a leading +, so it dials from a phone.
- On touch screens the email and phone links are boxes of 44px at least.
- The address is in <address>, its lines kept. The hours are a list of their own: the days, then the times.
- The labels are props with plain English defaults: pass your page's own words in another language.
- The large email is still a link and still reads as the address; only its size changes. A long address breaks after the @ first, and inside a name only when the name alone is wider than the row.
ContactDetails
ProTo show your details large, the email first, when you do not want a form.
- File
- ContactDetails.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 1
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
The email, large
The email leads on a row of its own, large (the subhead role, sized to the section, a step under the heading), then the phone, address and hours in a row that wraps: side by side in a wide section, one under another on a phone. No form, so no endpoint is needed.
This preview did not load.
main.astro
examples/contactdetails/main.astro
---
import ContactDetails from "@astronomic/ui-pro/components/ContactDetails.astro";
// Made-up details: a reserved .example address, and a US number from the 555-0100 to 555-0199 range kept for fiction.
const hours = [
{ label: "Mon to Thu", value: "9 a.m. to 5:30 p.m." },
{ label: "Fri", value: "9 a.m. to 3 p.m." },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<ContactDetails
heading="Say hello"
text="Write, call or come by the studio. A person reads every message."
email="hello@astronomic.example"
phone="+1 (312) 555-0147"
address={["Astronomic", "12 Orbit Lane", "Example City, IL 60601"]}
hours={hours}
/>
</div>Minimal · Light