Skip to content
W WRNexusJS
data component

PricingComparisonTable

Reusable pricing comparison table component.

@wrnexus/ui 0.2.674 props0 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<PricingComparisonTable
  caption="Plan comparison"
  plans="[]"
  features="[]"
/>

Legacy mount name: data-component="PricingComparisonTable".

Props and attributes

PropTypeRequirementDefault
captionstringOptional"Plan comparison"
plansstringOptional[]
featuresstringOptional[]
classstringOptional""

Slots

This component does not declare a slot.

Events

This component does not declare a custom event.

Source contract

Installed source: components/PricingComparisonTable.wrn

component PricingComparisonTable {
  props {
    caption = "Plan comparison"
    plans = []
    features = []
    class = ""
  }
  view {
        <div class="wire-table-wrap {class}" tabindex="0" role="region" aria-label="{caption}">
        <table class="wire-table wire-comparison-table">
        <caption class="wire-visually-hidden">{caption}</caption>
        <thead>
        <tr>
        <th scope="col">Feature</th>{#each plans as plan}<th scope="col">{plan.name}</th>{/each}</tr>
        </thead>
        <tbody>{#each features as feature}<tr>
        <th scope="row">{feature.label}</th>{#each feature.values as value}<td>{value}</td>{/each}</tr>{/each}</tbody>
        </table>
        </div>
    }
}