A pair with a control, the control named by its term through termId.
- Supply temperature
- 21.4 °C
- Heating
- On
The details of one thing as rows of a term and its value — a property and its reading, a setting and the control that changes it — on the platform's description list.
@pacit/components/descriptiondl[pctDescriptionList], div[pctDescription]Semantics come from the native <dl> — no role and no keyboard handling of ours
import { Component } from '@angular/core';
import {
PctDescription,
PctDescriptionList,
} from '@pacit/components/description';
/** Terms and their values on the platform's dl. */
@Component({
selector: 'demo-description',
imports: [PctDescriptionList, PctDescription],
template: `
<dl
pctDescriptionList
style="inline-size: 260px; --pct-description-term-width: 8rem"
>
<div pctDescription>
<span pctDescriptionTerm>Supply</span>
21.4 °C
</div>
<div pctDescription>
<span pctDescriptionTerm>Mode</span>
Heating
</div>
</dl>
`,
})
export class DescriptionDemo {}description.demo.ts — the same file runs here and is highlighted under Code
One import per component, and the shortest possible use — the package itself is installed once, on the start page.
import { PctDescriptionList, PctDescription } from '@pacit/components/description';| Exported | What it is |
|---|---|
PctDescriptionListcomponentunreleaseddl[pctDescriptionList] | A description list: the details of one thing as terms and their values — a property and its reading, a setting and its control. |
PctDescriptioncomponentunreleaseddiv[pctDescription] | One pair of the list: the term, its value, and a control that changes the value when the thing can be changed. The host is the <div> a <dl> may group a pair in; the <dt> and the <dd>s are this component's own. |
<dl pctDescriptionList>
<div pctDescription>
<span pctDescriptionTerm>Supply temperature</span>
21.4 °C
</div>
</dl>Each example is the component itself, not a screenshot. Open the code under any of them.
Read from the source at build time — the types, the defaults and the lines of documentation are the library's own.
unreleased marks 2 of them: on main, and not in @pacit/components@0.2.0 — the next release names the version.
A description list: the details of one thing as terms and their values — a property and its reading, a setting and its control.
| Name | Type | What it does |
|---|---|---|
| No inputs — the element is configured by its content. | ||
(click), (focus), the form's submit — are the platform's, and two-way models above carry the rest. The hooks a stylesheet or a test can hold. Stable by contract — the parts inventory gate fails the build when one disappears.
| Attribute | Bound to | Note |
|---|---|---|
class | pct-description-list |
Two ways in, both stable. No class names to depend on.
In a test, PctDescriptionListHarness, PctDescriptionHarness from @pacit/components/testing read a part by the name below and a state by its attribute — the harness gate holds the names to the package.
| Part | Selector | What it is |
|---|---|---|
control | [data-pct-part="control"] | the <dd> of the control, empty and hidden when none |
term | [data-pct-part="term"] | the <dt> of the pair |
value | [data-pct-part="value"] | the <dd> of the value |
Every value the component reads, with the light and the dark default. Override a token at any scope and it cascades like any custom property.
| Token | Styles |
|---|---|
--pct-description-border{pct.border}#e2e8f0 · #334155 | Colour of the line between rows. |
--pct-description-fg{pct.text}#0f172a · #ffffff | Text colour of a value. |
--pct-description-gap{pct.space.5}16px | Gap between the term, the value and the control of a row. |
--pct-description-min-width8rem | The narrowest a value stands beside its term before it wraps under it. |
--pct-description-padding-y{pct.space.3}8px | Block padding of a row. |
--pct-description-term-fg{pct.text-muted}#334155 · #e2e8f0 | Text colour of a term. |
--pct-description-term-width12rem | Width of a term while the row holds it. |
A brand override in a few declarations. Scope it to a theme attribute, a page or one container — the component never notices.
[data-theme='brand'] {
--pct-description-term-fg: #115e59;
--pct-description-term-width: 16rem;
} Pattern: a native <dl> — the platform's term and definition roles, which the pair writes as <dt> and <dd> itself. Named in the class JSDoc.
| key | effect | test |
|---|
Empty by design: the list handles no key; a control in a pair answers the keyboard on its own, as its own card says.
Every line is a test in three engines or a gate on every commit. The gaps are listed the same way, each with the requirement that will close it.
libs/components/description/src/description.tsapps/sandbox-e2e/src/a11y.spec.ts — /frame in SBX_ROUTESapps/sandbox-e2e/src/visual.spec.ts — frame-app and frame-app-rtlforced-colors: active — no state carried by colour alonelibs/components/description/src/description.scss — the line between rows CanvasText; the list has no state. The reading: apps/sandbox-e2e/src/forced-colors.spec.tsprefers-reduced-motion — duration from a tokennot applicable — the list moves nothing--pct-control-height-*deliberately not: a row is text, sized by its content and the spacing scalelibs/tokens/src/component.description.json — the padding and the gap stand on space.3 and space.5, which the compact scope re-pointsdir="rtl" screenshotlogical properties only, held by check-styles; the screenshot frame-app-rtl, where the term stands at the rightNG05xxapps/sandbox-e2e/src/hydration.spec.ts — /frame in SBX_ROUTESlibs/components/parts.snapshot.md — the three parts abovecontrast.policy.jsonlibs/tokens/src/contrast.policy.json — the value and the term (AA error), the line between rows (UI warn); libs/tokens/tokens.snapshot.mdPCT_TEXTSnot applicable — the component writes no word of its ownlibs/components/size.snapshot.md — the ./description rowdocs/acr/at/ — three readers, whole sandbox. The list and the control named by its term: Orca, tabbing from the navigation to the switch, leaving list. · leaving navigation. · Description list with 3 terms · Heating · switch pressed. — the count of terms, and the term as the switch's name. NVDA said list alone on the same switch, neither its name nor its role, which is for the next walk to measure against a switch outside a <dl>. VoiceOver lost the page before the listapps/sandbox/src/app/views/frame/ (the sandbox view). The published site: /components/description, its demos' source in the code tablibs/components/description/src/description.spec.ts; libs/components/mutation.snapshot.md — description.ts, measured by a narrow runRead at build time from the tracked snapshots, not typed here.
<dd> for one <dt>; the pair writes one value and one control. Two values are one value of the consumer's two lines.--pct-description-term-width is the term's basis: a term longer than it wraps inside its own width rather than widening every row.termId has to be passed to the control's ariaLabelledby; a control without a name is a control the axe audit finds, not this list.list alone on the switch in a pair. In the walk of 2026-11-02 NVDA with Firefox read the control named by termId as the list it stands in, with no name and no role, where Orca reads Heating · switch pressed.. The axe audit and the e2e both find the switch named Heating.<dl> warns in dev mode, and draws a <dt> the platform reads as no term at all.