Marketing sectionsPricingSingle
Searchastronomic.dev# PricingSingle
For one offer on its own, like a single product or a fixed package, with its price beside what you get.
Static: no JavaScript.
## Usage
```astro
import PricingSingle from "@astronomic/ui-pro/components/PricingSingle.astro";
```
## Examples
### One package
One wide card. From a 48rem section the name, price and button sit in the start third, the button right under the price, and the features take the other two thirds; from 64rem the features take two columns. Narrower, it stacks: summary, features, button.
```astro
---
import PricingSingle from "@astronomic/ui-pro/components/PricingSingle.astro";
const plan = {
name: "Launch package",
price: "$9,600",
period: "one time",
description: "Everything a new firm needs to go live, at one fixed price.",
features: [
"Brand refresh and style guide",
"Up to twelve pages",
"Two rounds of design changes",
"Content migration",
"CMS setup",
"Editor training for your team",
"Launch in six weeks",
"Thirty days of support after launch",
],
action: { label: "Book the launch package", href: "#launch" },
};
---
<div class="mx-auto max-w-6xl px-6 py-16">
<PricingSingle heading="One package, one price" text="No hourly billing and no surprises: you know the cost before we start." plan={plan} />
</div>
```
## Props
### PricingSingle
| 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 plans. |
| `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. Plan names 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. |
| `itemHeadingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | `"h3"` | The plan name element when there is no heading. With a heading, names sit one level under it. |
| `plan` | `Omit<PricingPlanItem, "highlighted" \| "badge">` | None | Required. The one plan: { name, price, period?, regularPrice?, regularPriceLabel?, priceNote?, description?, features, action }. price and period are strings, so any currency or wording works. action is { label, href?, variant?, disabled?, note? }: disabled renders a disabled button (no link) for a plan you cannot sell yet, and note is a short line under the button that says why, such as Coming soon. With nothing to compare it with, it takes no highlight and no badge, and its button is secondary unless action.variant says otherwise. Only these fields reach the plan. |
| 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.
- Each plan name sits one level under the section heading (h2 gives h3). With no heading, it is an h3 unless you set itemHeadingTag.
- Each plan's features are a list (<ul role="list">), so a screen reader says how many there are.
- Give each action a label that names the plan, like "Choose Studio", so the links make sense out of context.
- The one plan sits in a plain box, not a one-item list.
PricingSingle
ProFor one offer on its own, like a single product or a fixed package, with its price beside what you get.
- File
- PricingSingle.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
One package
One wide card. From a 48rem section the name, price and button sit in the start third, the button right under the price, and the features take the other two thirds; from 64rem the features take two columns. Narrower, it stacks: summary, features, button.
This preview did not load.
main.astro
examples/pricingsingle/main.astro
---
import PricingSingle from "@astronomic/ui-pro/components/PricingSingle.astro";
const plan = {
name: "Launch package",
price: "$9,600",
period: "one time",
description: "Everything a new firm needs to go live, at one fixed price.",
features: [
"Brand refresh and style guide",
"Up to twelve pages",
"Two rounds of design changes",
"Content migration",
"CMS setup",
"Editor training for your team",
"Launch in six weeks",
"Thirty days of support after launch",
],
action: { label: "Book the launch package", href: "#launch" },
};
---
<div class="mx-auto max-w-6xl px-6 py-16">
<PricingSingle heading="One package, one price" text="No hourly billing and no surprises: you know the cost before we start." plan={plan} />
</div>Minimal · Light