Comparison Table
A plan-versus-feature matrix built as a real table, with readable boolean cells.
6 फ्रेमवर्कशुरुआती
A long, grouped comparison table with sticky plan headers and an accented column.
<!--
The grown-up version of comparison-table: many rows, sorted into groups.
The group heading is a <th scope="colgroup"> spanning the width inside its own
<tbody> - that is what makes "Security" a heading for the rows beneath it
rather than a stray cell. A styled <tr> of divs cannot express it.
<thead> repeats on print and on paginated AT output for free, which is most of
the reason a long matrix should be a table and not a grid.
-->
<div class="matrix">
<table class="matrix__table">
<caption class="matrix__caption">Feature availability by plan</caption>
<thead>
<tr>
<th class="matrix__col matrix__col--feature" scope="col">Feature</th>
<th class="matrix__col" scope="col">Starter</th>
<th class="matrix__col matrix__col--accent" scope="col">
Pro
<span class="matrix__badge">Popular</span>
</th>
<th class="matrix__col" scope="col">Enterprise</th>
</tr>
</thead>
<tbody class="matrix__group">
<tr>
<th class="matrix__group-head" scope="colgroup" colspan="4">Collaboration</th>
</tr>
<tr>
<th class="matrix__row-head" scope="row">Team members</th>
<td class="matrix__cell">1</td>
<td class="matrix__cell matrix__cell--accent">10</td>
<td class="matrix__cell">Unlimited</td>
</tr>
<tr>
<th class="matrix__row-head" scope="row">Guest access</th>
<td class="matrix__cell">
<span class="matrix__no" aria-hidden="true">✗</span><span class="matrix__sr">Not included</span>
</td>
<td class="matrix__cell matrix__cell--accent">
<span class="matrix__yes" aria-hidden="true">✓</span><span class="matrix__sr">Included</span>
</td>
<td class="matrix__cell">
<span class="matrix__yes" aria-hidden="true">✓</span><span class="matrix__sr">Included</span>
</td>
</tr>
</tbody>
<tbody class="matrix__group">
<tr>
<th class="matrix__group-head" scope="colgroup" colspan="4">Security</th>
</tr>
<tr>
<th class="matrix__row-head" scope="row">SSO & SAML</th>
<td class="matrix__cell">
<span class="matrix__no" aria-hidden="true">✗</span><span class="matrix__sr">Not included</span>
</td>
<td class="matrix__cell matrix__cell--accent">
<span class="matrix__no" aria-hidden="true">✗</span><span class="matrix__sr">Not included</span>
</td>
<td class="matrix__cell">
<span class="matrix__yes" aria-hidden="true">✓</span><span class="matrix__sr">Included</span>
</td>
</tr>
<tr>
<th class="matrix__row-head" scope="row">Audit log retention</th>
<td class="matrix__cell">7 days</td>
<td class="matrix__cell matrix__cell--accent">90 days</td>
<td class="matrix__cell">Unlimited</td>
</tr>
</tbody>
<tbody class="matrix__group">
<tr>
<th class="matrix__group-head" scope="colgroup" colspan="4">Support</th>
</tr>
<tr>
<th class="matrix__row-head" scope="row">Response time</th>
<td class="matrix__cell">Community</td>
<td class="matrix__cell matrix__cell--accent">24 hours</td>
<td class="matrix__cell">1 hour</td>
</tr>
<tr>
<th class="matrix__row-head" scope="row">Dedicated manager</th>
<td class="matrix__cell">
<span class="matrix__no" aria-hidden="true">✗</span><span class="matrix__sr">Not included</span>
</td>
<td class="matrix__cell matrix__cell--accent">
<span class="matrix__no" aria-hidden="true">✗</span><span class="matrix__sr">Not included</span>
</td>
<td class="matrix__cell">
<span class="matrix__yes" aria-hidden="true">✓</span><span class="matrix__sr">Included</span>
</td>
</tr>
</tbody>
</table>
</div>| Prop | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
itemsआवश्यक | FeatureGroup[] | - | रेंडर की जाने वाली आइटम की सूची। |
plansआवश्यक | MatrixPlan[] | - | तुलना की जा रही कॉलम, प्रदर्शन क्रम में। |
highlighted | string | - | एक्सेंट स्टाइल के साथ रेंडर करता है। |
className | string | - | रूट एलिमेंट पर मर्ज होने वाली अतिरिक्त क्लासेज़। |
The grown-up version of the comparison table: enough rows that they need sorting into groups, which is where the markup earns its keep. Each group is its own `<tbody>` headed by a `<th scope="colgroup" colspan>` - that is what makes "Security" a heading for the rows beneath it rather than a wide decorative cell, and it is the thing a grid of divs simply cannot express. Column headers are sticky and therefore need an opaque background, so they carry a real surface colour and get repainted in the dark block rather than left to inherit. The recommended column is accented with a tint, but the tint is only ever reinforcement: the plan's own "Popular" badge is a text node, so it survives forced-colours mode, a colour-filtered screen and a black-and-white printout - all of which erase the blue.