Skip to content

PricingTable

<ax-pricing-table> renders tiered pricing cards from a [tiers] array. Each card lists features with a check icon and a ax-button CTA. The highlighted tier gets a primary ring and a text badge (highlightLabel, default "Popular") so emphasis is not color-only. CTA clicks emit (selectTier).

import { AxPricingTableComponent, type PricingTier } from '@axisui-ng/blocks';
tiers: PricingTier[] = [
{ name: 'Starter', price: '$0', period: '/mo', features: ['1 project', 'Community support'] },
{
name: 'Pro',
price: '$29',
period: '/mo',
features: ['Unlimited projects', 'Email support', 'Analytics'],
highlighted: true,
cta: 'Upgrade',
},
{ name: 'Enterprise', price: 'Custom', features: ['SSO', 'Dedicated support', 'SLA'], cta: 'Contact us' },
];
<ax-pricing-table
[tiers]="tiers"
highlightLabel="Popular"
ariaLabel="Pricing"
(selectTier)="choose($event)"
>
<h2 class="mb-6 text-lg font-semibold">Plans</h2>
</ax-pricing-table>
InputTypeDefaultNotes
tiersPricingTier[][]One card per tier; tracked by name. Layout is always sm:grid-cols-2 lg:grid-cols-3.
ariaLabelstring''Host aria-label on role="group"; empty omits the attribute.
highlightLabelstring'Popular'Badge text on the highlighted tier (non-color emphasis cue).
FieldTypeRequiredNotes
namestringyesTier title (also the @for track key).
pricestringyesDisplay price (e.g. '$29', 'Custom').
periodstringnoShown next to price when set (e.g. '/mo').
featuresstring[]yesBullet list; each row gets a decorative check icon.
ctastringnoButton label; defaults to 'Get started'.
highlightedbooleannoPrimary ring + badge; CTA uses variant="primary" (else secondary).
OutputPayloadNotes
selectTierPricingTierEmitted when that tier’s CTA clickEvent fires.
SlotSelectorNotes
Default<ng-content />Optional projected content (typically a heading) rendered above the pricing cards.

Host is role="group". Set ariaLabel so the group has an accessible name. Highlighted tiers use a visible text badge plus a ring — not color alone. Feature check icons are aria-hidden="true". CTAs are real ax-button controls.

Interactive examples live in Storybook under Blocks / PricingTable. Run pnpm storybook to explore them.