Marketing sectionsCtaBandImage
Searchastronomic.dev# CtaBandImage
Near the end of a page, when a photo helps the ask: the text and actions beside an image on the band.
Static: no JavaScript.
## Usage
```astro
import CtaBandImage from "@astronomic-dev/ui/components/CtaBandImage.astro";
```
## Examples
### Visit the studio
The text and the action beside a photo from a 48rem band, the photo reaching the band's edge; below that, the photo on top at 16/9.
```astro
---
import CtaBandImage from "@astronomic-dev/ui/components/CtaBandImage.astro";
// Your own image file.
import desk from "../../photos/studio-desk.webp";
---
<section class="mx-auto max-w-6xl px-6 py-12">
<CtaBandImage
heading="Come and see the studio."
text="We work from a small room by the harbor. Bring your brief; the coffee is on us."
actions={[{ label: "Plan a visit", href: "#visit" }]}
image={{ src: desk, alt: "A desk by a window, with a laptop and a lamp." }}
/>
</section>
```
### Photo at the start
With side="start" the photo sits before the text on a wide band. The text stays first in the reading order, and below 48rem the photo is on top.
```astro
---
import CtaBandImage from "@astronomic-dev/ui/components/CtaBandImage.astro";
// Your own image file.
import desk from "../../photos/studio-desk.webp";
---
<section class="mx-auto max-w-6xl px-6 py-12">
<CtaBandImage
side="start"
heading="Come and see the studio."
text="We work from a small room by the harbor. Bring your brief; the coffee is on us."
actions={[{ label: "Plan a visit", href: "#visit" }]}
image={{ src: desk, alt: "A desk by a window, with a laptop and a lamp." }}
/>
</section>
```
## Props
### CtaBandImage
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | Required. The heading, in the title role in display type. |
| `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. |
| `actions` | `Omit<NavAction, "size">[]` | `[]` | Buttons on the band (Button tone="cta"). NavAction is { label, href, variant? }. The first is `primary` and the rest `secondary`, unless you set variant. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. |
| `image` | `MediaImage` | None | An image beside the text on a wide band, on top when narrower; ratio 16/9 when on top; loading lazy unless set. Pass image or the media slot. MediaImage is { src, alt, width?, height?, ratio?, loading?, focalPoint? }. |
| `side` | `"end" \| "start"` | `"end"` | The image's side on a wide band. The text stays first in the reading order. |
| `class` | `string` | None | More classes, merged with cn(), so yours win on conflicts. A border you add takes the band's edge color. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. |
| `default` | More content under the actions, such as the studio's email link. |
| `media` | Your own image element in place of image. It wins over image. It is not sized for you: size it yourself to fill the row on a wide band. |
Any other attribute goes on the <section>.
## Accessibility
- Renders a <section> named by its heading, so it is a region landmark.
- The focus ring on the band is band-fg, so it shows on the band in every preset.
- Actions are links that look like buttons. Give each a label that says where it goes.
- The image comes after the text in the page order, also with side="start". It needs alt like any Media; use alt="" when it only decorates.
CtaBandImage
FreeNear the end of a page, when a photo helps the ask: the text and actions beside an image on the band.
- File
- CtaBandImage.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 2
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Visit the studio
The text and the action beside a photo from a 48rem band, the photo reaching the band's edge; below that, the photo on top at 16/9.
This preview did not load.
main.astro
examples/ctabandimage/main.astro
---
import CtaBandImage from "@astronomic-dev/ui/components/CtaBandImage.astro";
// Your own image file.
import desk from "../../photos/studio-desk.webp";
---
<section class="mx-auto max-w-6xl px-6 py-12">
<CtaBandImage
heading="Come and see the studio."
text="We work from a small room by the harbor. Bring your brief; the coffee is on us."
actions={[{ label: "Plan a visit", href: "#visit" }]}
image={{ src: desk, alt: "A desk by a window, with a laptop and a lamp." }}
/>
</section>Photo at the start
With side="start" the photo sits before the text on a wide band. The text stays first in the reading order, and below 48rem the photo is on top.
This preview did not load.
start.astro
examples/ctabandimage/start.astro
---
import CtaBandImage from "@astronomic-dev/ui/components/CtaBandImage.astro";
// Your own image file.
import desk from "../../photos/studio-desk.webp";
---
<section class="mx-auto max-w-6xl px-6 py-12">
<CtaBandImage
side="start"
heading="Come and see the studio."
text="We work from a small room by the harbor. Bring your brief; the coffee is on us."
actions={[{ label: "Plan a visit", href: "#visit" }]}
image={{ src: desk, alt: "A desk by a window, with a laptop and a lamp." }}
/>
</section>Minimal · Light