Components / financial
PriceSummary
Summarizes an amount, currency and pricing model.
Generated from @oods/foundry 0.10.1
- Categories
- financial
- Contexts
- detail
- Readiness
proven-in-generated-apps
Playground
This component's contract doesn't list typed props, so the playground shows its documented example.
Documented example price-summary-terms : mount, h2 heading and a four-term description list.
The render follows the page's theme switch: light, dark or high contrast. Both frameworks render the same example.
Price Summary
- Amount
- $1,299.00
- Currency
- USD
- Model
- Recurring
- Interval
- Month
Price Summary
- Amount
- $1,299.00
- Currency
- USD
- Model
- Recurring
- Interval
- Month
Code
The documented example. HTML is the markup the React component renders for it, which @oods/component-styles styles.
import { PriceSummary } from '@oods/components-react';
import '@oods/component-styles/css';
export function Example() {
return (
<PriceSummary
title="Price Summary"
amount={129900}
currency="USD"
model="recurring"
interval="month"
/>
);
}Props, slots and events
Contract version 1.1.0. Types are from the React declarations in @oods/components-react.
| Prop | Type | Required | Documented example |
|---|---|---|---|
title | string | undefined | no | Price Summary |
label | string | undefined | no | |
heading | string | undefined | no | |
name | string | undefined | no | |
amount | string | number | undefined | no | 129900 |
amount | string | number | undefined | no | |
unit | string | number | undefined | no | |
minor | number | undefined | no | |
currency | string | undefined | no | USD |
currency | string | undefined | no | |
model | string | undefined | no | recurring |
pricing | string | undefined | no | |
interval | string | undefined | no | month |
billing | string | undefined | no | |
summary | string | undefined | no | |
text | string | undefined | no | |
description | string | undefined | no |
Slots
default
Events
none
States
priced, fallback, empty
Accessibility
- Role
none- How it gets its name
headingonh1,h2,h3,h4,h5,h6
Keyboard
The contract lists no keyboard behaviour.
Obligations in the contract
- A real h2 heading names the summary section
- Summary terms and values preserve description-list relationships
- Amounts use currency and declared minor units (100 by default); zero, absent and invalid amounts stay distinct
Mirrors renderPriceSummary over renderSummarySection with data-summary-type=price: title aliases title/label/heading/name (default Price Summary); Amount reads amount/amountCents/unitAmountCents as stored minor units and uses currency formatting; minorUnits defaults to 100. Model and interval codes are humanized. Currency currency/currencyCode, Model model/pricingModel, Interval interval/billingInterval; summary/text/description is the fallback paragraph when no term resolves. amountField, currencyField, modelField and intervalField lower to amount, currency, model and interval; taxBehaviorField is consumed and left unbound because the HTML renderer emits no tax-behavior term.
Tokens
The token roles this component reads.
summary.backgroundsummary.bordersummary.textsummary.label
Readiness
The evidence recorded for this component, with its label.
proven-in-generated-apps: catalog_list gives this label when generated React and Vue apps in the runtime sweep that ships with this version both use the component. That sweep was measured on the published 0.4.1, not on this version.
| Evidence | React | Vue |
|---|---|---|
| state | implemented-evidence-complete | implemented-evidence-complete |
| versioned contract | passed | passed |
| target implementation | passed | passed |
| package export | passed | passed |
| public declaration | passed | passed |
| dependency closure | passed | passed |
| framework scenario | passed | passed |
| accessibility | verified | verified |
| interaction | not-applicable | not-applicable |
| visual themes | verified | verified |
PriceSummary presents content and owns no focusable control or action; authored child actions remain the consumer's responsibility.
Use your own
You can replace this component with your own React or Vue component. Map it, and generated code imports yours at the exact version you name. A contract report, run in a real browser, lists what your component met, what it didn't, and what wasn't checked.
The component_map call, with the parts in angle brackets yours to fill:
{
"action": "create",
"apply": true,
"externalSystem": "<your design system>",
"externalComponent": "<YourPriceSummary>",
"oodsTraits": [
"Priceable"
],
"substitution": {
"component": "PriceSummary",
"react": {
"package": "<your-package>/react",
"version": "<exact version>",
"export": "<YourPriceSummary>"
},
"vue": {
"package": "<your-package>/vue",
"version": "<exact version>",
"export": "<YourPriceSummary>"
}
}
} How this page was made
Generated at build from the published data, each source with the hash of what was read. The page's manifest.
- Contract:
@oods/component-contracts@0.10.1 componentContracts.PriceSummarysha256:85d75d050afc… - Documented example:
@oods/component-contracts@0.10.1 sharedScenarios price-summary-termssha256:ccf52d012911… - Catalog entry (catalog_list):
generated/0.10.1/system/catalog.json PriceSummarysha256:04cd376556a8… - React readiness:
@oods/components-react@0.10.1 readiness PriceSummarysha256:f297fbfa56b4… - Vue readiness:
@oods/components-vue@0.10.1 readiness PriceSummarysha256:6178c46f1157… - Prop types:
generated/0.10.1/components/prop-types.json PriceSummarysha256:fce9eab1fc09…