PricingSingle
apps/www/src/sections/PricingSingle.astro · 33 lines · group Pricing
PricingSingle — a single rate on a muted band: one centered <Plan> with the price and one button. A price is pricing, not a call to action. Use for: "one product, one price" — a licence, an hourly rate, a flat fee. Not for: a price meant as the argument for a button (<CtaPrice>); several tariffs (<PricingCards>). Children: exactly one <Plan>; give it cta="primary" so the lone button carries the action.
In the fleet
Used on 1 site built with this engine.
Samples 1
Extra station
€12per month
MDX of this sample
<PricingSingle>
<Plan name="Extra station" price="€12" priceNote="per month" primaryText="Add a station" primaryHref="/stations/" cta="primary" />
</PricingSingle>Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | 'pricing' | anchor of the section (default "pricing") | |
| title | string | the section heading | ||
| description | string | a paragraph under the heading | ||
| theme | 'light' | 'muted' | 'dark' | 'brand' | 'brand-dark' | 'muted' | background of the band (default "muted") |
Source apps/www/src/sections/PricingSingle.astro @ gitt.one
---
/**
* PricingSingle — a single rate on a muted band: one centered <Plan> with the
* price and one button. A price is pricing, not a call to action.
*
* Use for: "one product, one price" — a licence, an hourly rate, a flat fee.
* Not for: a price meant as the argument for a button (<CtaPrice>); several
* tariffs (<PricingCards>).
* Children: exactly one <Plan>; give it cta="primary" so the lone button
* carries the action.
*/
import Section from './_Section.astro';
import type { Theme } from './_Section.astro';
interface Props {
/** anchor of the section (default "pricing") */
id?: string;
/** the section heading */
title?: string;
/** a paragraph under the heading */
description?: string;
/** background of the band (default "muted") */
theme?: Theme;
}
const { id = 'pricing', title, description, theme = 'muted' } = Astro.props;
---
<Section id={id} title={title} description={description} theme={theme} heading="left">
<div class="mx-auto grid max-w-xl grid-cols-1 gap-8" data-variant="single">
<slot />
</div>
</Section>Source links point to engine-astro@7b686388. Samples are demo content: the components are the real ones, the copy and the pictures are made up.