Data
JS behaviour
Comparison table
A plan comparison with the recommended column ringed in light; the marks pop in row by row, and on a phone the feature column stays put while the plans scroll sideways.
Real scenarios
The component as it is used in a product — not a specimen grid.
The pricing page, verbatim
The Growth column carries the lit ring; the checks pop in row by row as the table arrives, and true/false values are spoken as words by screen readers.
Not only pricing
The same block comparing hardware — text values, no recommended column, the caption kept visible as a heading.
| Features | Paper The original | Ink E-ink, front-lit | Glass The tablet |
|---|---|---|---|
| Display | |||
| Reads in sunlight | Included | Included | Not included |
| Weight | 310 g | 195 g | 440 g |
| Battery | |||
| Page turns per charge | ∞ | 21,000 | 10 h |
| Charges by | — | USB-C | USB-C |
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| plans | array | [] | Each plan: ['id' => …, 'name' => …, 'price' => …, 'period' => …, 'description' => …, 'action' => ['label' => …, 'href' => …]]. |
| features | array | [] | Each feature: ['group' => …, 'label' => …, 'hint' => …, 'values' => ['starter' => true|false|text]]; true/false become a check and a dash. |
| recommended / recommendedLabel | string | null | The recommended plan’s id and its label. |
| caption / featureLabel / includedLabel / excludedLabel | string | null | The table caption and the screen-reader words for the feature column and yes/no marks. |
Snippet
<x-nx::comparison-table caption="مقایسهٔ پلنها" recommended="growth" :plans="$plans" :features="[
['group' => 'ایجنتها', 'label' => 'زبانها', 'values' => ['starter' => '۳', 'growth' => '۱۲', 'scale' => '۴۰+']],
['group' => 'امنیت', 'label' => 'SSO / SAML', 'values' => ['starter' => false, 'growth' => false, 'scale' => true]],
]" />