डिस्क्रिप्शन लिस्ट
किसी एक चीज़ के बारे में जो पता है, उसे नाम वाले तथ्यों के रूप में दिखाती है: एक हल्का टर्म और वह मान जो उसका जवाब है। टर्म अपने मान के बग़ल में, उसके ऊपर, या किसी बड़े आँकड़े के नीचे होते हैं। इसका लेआउट इसकी अपनी चौड़ाई से तय होता है, और यह कभी कंट्रोल नहीं होती।
- श्रेणी
- कंटेनमेंट
- टोकन
comp.description-list- स्तर
- आधार
- Web
tanrei-description-listschedule - SwiftUI
TanreiDescriptionListradio_button_unchecked - Jetpack Compose
TanreiDescriptionListradio_button_unchecked - Flutter
TanreiDescriptionListradio_button_unchecked - React Native
DescriptionListradio_button_unchecked
इससे जनरेट किया गया: docs/status/status.json, specs/description-list.spec.json
एक ऑर्डर के तथ्य
- ऑर्डर नंबर
- A-20418
- ऑर्डर की तारीख़
- 6 अक्तूबर 2026
- डिलीवरी का पता
- 4-2-8 Shibakoen, Minato, Tokyo
- स्थिति
- कुल
- ¥ 12,800
डिस्क्रिप्शन लिस्ट किसी एक चीज़ के तथ्य दिखाती है: कोई ऑर्डर, फ़ाइल, खाता या कंपोनेंट। हर तथ्य एक टर्म और वह मान है जो उसका जवाब है। टर्म एक हल्का लेबल है; मान वह है जिसके लिए व्यक्ति आया है।
तीन लेआउट वही तथ्य बनाते हैं:
layout |
क्या बनाता है | किसके लिए |
|---|---|---|
inline (डिफ़ॉल्ट) |
टर्म अपने मान के बग़ल में। सभी टर्म एक ही कॉलम में होते हैं, जो सबसे चौड़े टर्म जितना चौड़ा होता है। | तथ्यों का वह ब्लॉक जिसमें व्यक्ति कोई बात ढूँढकर देखता है। |
stacked |
टर्म अपने मान के ऊपर। | लंबे मान या लंबे टर्म, और कई कॉलम में रखे तथ्य। |
stat |
पहले मान, एक बड़े आँकड़े के रूप में, और उसके नीचे उसके लेबल के रूप में टर्म। | वे गिनी-चुनी संख्याएँ जिनसे कोई स्क्रीन शुरू होती है। |
वेब पर यह आपकी अपनी नेटिव <dl> के चारों ओर <tanrei-description-list> है। एलिमेंट में कोई शैडो रूट नहीं है और वह लिस्ट को कोई रोल नहीं देता, इसलिए स्क्रीन रीडर, क्रॉलर और बिना स्क्रिप्ट वाला पेज, सबको एक साधारण HTML डिस्क्रिप्शन लिस्ट ही मिलती है। बाक़ी प्लैटफ़ॉर्म ने इसे अभी इम्प्लीमेंट नहीं किया है।
<link rel="stylesheet" href="@tanrei/web/description-list.css" />
<tanrei-description-list>
<dl>
<div><dt>ऑर्डर नंबर</dt><dd>A-20418</dd></div>
<div><dt>मालिक</dt><dd>Aiko Tanaka</dd><dd>Samir Haddad</dd></div>
<div>
<dt>स्थिति</dt>
<dd><tanrei-tag size="small" status="success" label="भेज दिया गया"></tanrei-tag></dd>
</div>
</dl>
</tanrei-description-list>
<script type="module">
import '@tanrei/web/components/description-list';
</script>import { DescriptionList } from '@tanrei/react';
import '@tanrei/web/description-list.css';
<DescriptionList layout="stat" columns={3}>
<dl>
{figures.map((figure) => (
<div key={figure.label}>
<dt>{figure.label}</dt>
<dd>{figure.value}</dd>
</div>
))}
</dl>
</DescriptionList>@tanrei/web/description-list.css किसी भी स्क्रिप्ट के चलने से पहले पूरी लिस्ट बना देती है। एलिमेंट वही स्टाइलशीट पेज में ख़ुद जोड़ता है, इसलिए जो पेज सिर्फ़ स्क्रिप्ट लोड करता है, उसे भी बनी हुई लिस्ट मिलती है, एक पल बाद।
| भाग | वेब पर |
|---|---|
| तथ्य | <dl> के भीतर एक <div>, जो एक <dt> और उसके <dd> के चारों ओर होता है। |
| टर्म | <dt>। टेक्स्ट, या वह कंपोनेंट जिसे मान समझाता है (लेजेंड का कोई टैग)। कोलन न लिखें। |
| मान | एक <dd>। टेक्स्ट, कोई कंपोनेंट, या कुछ नहीं। |
| कई मान | एक ही तथ्य में कई <dd>। हर एक अपनी अलग पंक्ति पर बनता है। |
<div> ग्रुप के बिना लिखी <dl>, जैसी कुछ Markdown रेंडरर लिखते हैं, तब भी एक कॉलम में बनती है, inline या stacked। columns और stat लेआउट को ये ग्रुप चाहिए।
Stat: वे संख्याएँ जिनसे कोई स्क्रीन शुरू होती है
- इस हफ़्ते के ऑर्डर
- 1,284
- पिछले हफ़्ते से 12% ज़्यादा
- समय पर डिलीवर हुए
- 98.6%
- बिल्ड का मीडियन समय
- 4 मिनट 12 सेकंड
कॉलम में stacked: लिस्ट सँकरी हो तो कॉलम कम हो जाते हैं
- नियोजित
- स्पेक लिखा जा चुका है, पर इस प्लैटफ़ॉर्म पर अभी इम्प्लीमेंट नहीं हुआ।
- पीछे
- इम्प्लीमेंट हो चुका है, पर मौजूदा स्पेक से पीछे है।
- Alpha
- इम्प्लीमेंट और टेस्ट हो चुका है; API अभी बदल सकता है।
- Beta
- API तय हो चुका है; असल इस्तेमाल से मिली रिपोर्ट चाहिए।
- Stable
- वर्शनिंग के वादे के दायरे में है।
- अप्रचलित
- अभी भी दिया जाता है; इसकी जगह लेने वाली चीज़ बताई गई है।
Compact, ख़ाली जगह से अलग किए गए: वे तथ्य जिन पर व्यक्ति नज़र दौड़ाता है
- मान
- #1b1c1e
- → ref.palette.neutral.10
- प्रकार
- एलियास · color
- विवरण
- किसी भी सरफ़ेस या सरफ़ेस कंटेनर पर टेक्स्ट और ग्लिफ़।
संरचना
| भाग | विवरण |
|---|---|
1 container | The list's box: as wide as its layout gives it, as tall as its facts. It has no fill, edge, corner or outer space of its own, and carries no state: nothing about it answers a pointer, a press or focus. |
2 fact | One term with the value or values that answer it. Facts are drawn in the order given: one under another, or in equal columns. |
3 term | The name of a fact, in a label style and a quieter color than its value: beside the value in a column all terms share, above it, or — in the stat layout — under it as the figure's label. Text, or a component of the product's (a tag that is explained by the value). |
4 value | What answers the term: text that wraps inside its column, or a component of the product's (a tag, a link, inline code, a button). A fact may have several, each on a line of its own. In the stat layout the first value is the figure, in a heading style. |
5 divider · वैकल्पिक | The one hairline between a fact and the fact below it, where facts are told apart by a line. |
प्रॉपर्टी
| प्रॉपर्टी | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
layout | inline | stacked | stat | "inline" | How a fact is drawn. inline: the term beside its value, every term in one column as wide as the widest term; the list draws its terms above their values by itself while it is too narrow for that (DSL-4). stacked: the term above its value, for long values or long terms, and for facts in several columns. stat: the value first, as a large figure, with the term under it as its label — the few numbers a screen opens with. |
columns | number | 1 | The most columns of facts the list draws in the stacked and stat layouts; it draws fewer while it is too narrow for that many (DSL-7), and never more than it has facts. An inline list is one column whatever this says. |
density | regular | compact | "regular" | How close the facts are and how large their text is. Regular is for facts a person reads: a page, a card, a dialog. Compact (smaller text, half the space) is for facts a person scans: a side panel, an inspector, a card of many figures. A design system may add values. |
separation | auto | divider | gap | "auto" | How a fact is told from the fact below it. divider: one hairline between them. gap: empty space and no line. Auto takes comp.description-list.separation, the design system's answer (divider in the default system). |
आइटम
वे आइटम के प्रकार जिन्हें कंपोनेंट दोहराता है। फ़िक्स्चर अपने आइटम क्रम से सूचीबद्ध करता है; हर प्लैटफ़ॉर्म हर प्रकार को अपने तरीक़े से नाम देता है।
fact · ग्रुप — इसमें आइटम होते हैं
One fact: a term, and the value or values that answer it.
| प्रॉपर्टी | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
term | string | "" | The fact's name, as short as it can be and without a colon ("Ships to"). In the stat layout it is the label under the figure ("orders this week"). |
| स्लॉट | विवरण |
|---|---|
term | What the term holds in place of plain text: a tag that the value explains (a legend), inline code, text with a glyph. The list places it and styles nothing inside it (DSL-10). |
| स्पेक | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| आइटम | div | TanreiFact | fact | TanreiFact | DescriptionList.Fact |
term · प्रॉपर्टी | dt | term | term | term | term |
| टिप्पणियाँ | A <div> inside the <dl> that groups one <dt> (its children are the term: text, or the term slot's content) with its <dd>s. A second <dt> in one group keeps working as HTML and is drawn under the first. | TanreiFact("Category", value: "Actions"), or with view builders for the term and the values. | A call in the list's scope: fact("Category", "Actions"), or fact(term = { … }) { value { … } }. | TanreiFact(term: "Category", value: "Actions"); termChild: and values: take widgets. | term takes a string or an element; the children are the values. |
value · ग्रुप — इसमें आइटम होते हैं
One value of a fact: plain text, a component of the product's, or nothing.
| स्लॉट | विवरण |
|---|---|
content | What the value holds in place of plain text: a tag, a link, inline code, a button, a short list, any view of the product's. The list places it and styles nothing inside it (DSL-10). |
| स्पेक | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| आइटम | dd | TanreiFactValue | value | TanreiFactValue | DescriptionList.Value |
| टिप्पणियाँ | A <dd>; its children are the content. | A string or a view builder; several in one fact's builder are several values. | value(text) or value { content } in a fact's scope. | TanreiFactValue.text("…") or TanreiFactValue(child: …). | Its children are a string or elements. A fact whose children are a string has that one value. |
tag
A tag placed in a value: the Tag component, as it is drawn anywhere else.
| प्रॉपर्टी | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
label | string | "" | The tag's text. |
variant | tonal | outlined | filled | "tonal" | The tag's look. |
status | default | info | warning | error | success | "default" | What the tag reports. |
size | small | medium | "medium" | The tag's size; small in a value, so that it does not make its line taller. |
| स्पेक | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| आइटम | tanrei-tag | TanreiTag | TanreiTag | TanreiTag | Tag |
label · प्रॉपर्टी | label | title | label | label | label |
variant · प्रॉपर्टी | variant | variant | variant | variant | variant |
status · प्रॉपर्टी | status | status | status | status | status |
size · प्रॉपर्टी | size | size | size | size | size |
स्टेट
व्यवहार
EARS रूप में लिखी गई आवश्यकताएँ। हर प्लैटफ़ॉर्म के इम्प्लीमेंटेशन को इन ID के आधार पर टेस्ट किया जाता है। आवश्यकताओं का पाठ स्पेक फ़ाइल से ज्यों का त्यों, अंग्रेज़ी में दिखाया गया है।
| ID | आवश्यकता |
|---|---|
DSL-1 | THE description list SHALL draw its facts in the order given, each fact a term and the value or values that answer it, as a block as wide as the layout gives it and as tall as its facts; it SHALL draw no fill, no edge, no corner and no elevation of its own, and SHALL bring no outer space of its own — no space above its first fact and none below its last — so that it is spaced by what holds it. |
DSL-2 | THE description list SHALL set every term in comp.description-list.term.typescale.regular while density is regular and in comp.description-list.term.typescale.compact while density is compact, in comp.description-list.term.color, and every value in comp.description-list.value.typescale.regular or comp.description-list.value.typescale.compact by density, in comp.description-list.value.color, with digits in figures of equal width so that the numbers of a column of values line up; it SHALL NOT add a colon or any other mark of its own after a term, and SHALL NOT change the weight, the case or the family of what the product wrote. |
DSL-3 | WHILE layout is inline THE description list SHALL draw one column of facts, and in each fact the term at the start and its values after it: every term in one term column, as wide as the widest term of the list set on one line, with no term wrapped or cut; every value in one value column that takes the rest of the list's width; and the two columns comp.description-list.term.gap.regular apart while density is regular and comp.description-list.term.gap.compact apart while density is compact. The first line of a term SHALL share its baseline with the first line of its first value. |
DSL-4 | WHILE layout is inline and the value column of DSL-3 would be narrower than comp.description-list.column.min-width THE description list SHALL draw every fact as layout stacked draws it (DSL-5) — all of its facts together, never some of them — and SHALL return to the two columns when the room is there again; it SHALL decide this from its own width, not from the window's, SHALL change at once and without a motion, and SHALL change nothing that is exposed (DSL-17). |
DSL-5 | WHILE layout is stacked THE description list SHALL draw in each fact the term on a line or lines of its own and its values below it after comp.description-list.stack.gap, both beginning at the start edge of the fact's column and no wider than it. |
DSL-6 | WHILE layout is stat THE description list SHALL draw in each fact the first value first, as a figure: in comp.description-list.stat.value.typescale.regular while density is regular and comp.description-list.stat.value.typescale.compact while density is compact, in comp.description-list.value.color, with digits in figures of equal width, on one line wherever the fact's column holds it; and the term below the figure after comp.description-list.stack.gap, in the term's own style and color (DSL-2), both beginning at the start edge of the fact's column. It SHALL set the figure's letter-spacing by the script of its text, as every title is set (PRS-20): no negative letter-spacing WHERE its language is Chinese, Japanese or Korean, and none WHERE its script joins its letters or stacks marks on them. THE description list SHALL still expose the term before its value (DSL-17): the order it draws changes nothing that is read. |
DSL-7 | WHILE layout is stacked or stat THE description list SHALL lay its facts out in columns of equal width, comp.description-list.column.gap apart, filled row by row in reading order from the start edge, the facts of a row beginning at one top edge: as many columns as the least of columns, the number of its facts, and the number of columns at least comp.description-list.column.min-width wide that its own width holds, and never fewer than one; WHEN its width changes it SHALL lay its facts out again at once, without a motion. WHILE layout is inline and columns is greater than 1 THE description list SHALL draw one column and in debug builds report that an inline list has one. IF columns is less than 1 or not a whole number THE description list SHALL draw one column and in debug builds report the value. |
DSL-8 | THE description list SHALL wrap the text of a value inside its column, and of a term wherever DSL-5 or DSL-6 places it, breaking lines by the rules of the text's language, and SHALL never cut it or end it with an ellipsis; a run with no break opportunity that is wider than its column (an identifier, an address) SHALL be broken where it meets the column's edge rather than be cut or reach outside the list. |
DSL-9 | WHERE a fact has more than one value THE description list SHALL draw each value on a line or lines of its own below the one before it, comp.description-list.stack.gap apart, in the order given, where the layout places a value: in the value column while the term sits beside it, under the term while it is stacked. WHILE layout is stat only the first value SHALL be the figure of DSL-6; those after it SHALL be drawn below the term, after comp.description-list.stack.gap, in the value's own style (DSL-2). |
DSL-10 | WHERE a term or a value holds a component or any content of the product's that is not plain text — a tag, a link, inline code, a button, a short list — THE description list SHALL place it where the text would begin, on the first line, SHALL add nothing to it and style nothing inside it, and SHALL let pointer, touch and keyboard input reach it as it would outside the list, in the reading order of the facts. |
DSL-11 | WHERE a fact has a term and no value, or a value with no content, THE description list SHALL draw the term, keep the value's place and one line of its height so that the fact stays in step with the others, expose the fact with an empty value, and SHALL NOT put a dash, a word or any other mark of its own in it. IF a fact has no term THE description list SHALL draw its values where they would be and in debug builds report that a value has no term. IF the list has no facts THE description list SHALL draw nothing, take no space and expose nothing. |
DSL-12 | WHILE the list's separation is divider (DSL-13) THE description list SHALL draw one line of comp.description-list.divider.thickness in comp.description-list.divider.color above every fact that is not in its first row, as wide as that fact's column — the whole width of the list where it draws one column, a term and its value under one line — and SHALL leave comp.description-list.fact.gap.regular between the line and the content on each side of it while density is regular, and comp.description-list.fact.gap.compact while density is compact, the line taking no room of its own; it SHALL draw no line above the first row or below the last, and none between two columns or between a term and its value. |
DSL-13 | THE description list SHALL tell a fact from the fact below it as its separation names: WHILE separation is auto, as comp.description-list.separation names, which follows sys.behavior.separation unless a design system sets it apart; WHILE separation is divider or gap, as that value names, whatever the tokens say; divider draws the lines of DSL-12 and gap leaves the space of DSL-14. WHEN separation, or the token it follows, changes THE description list SHALL draw the other form at once, without animation; WHEN separation names a value the description list does not define THE description list SHALL treat it as auto and in debug builds report the unknown value. A platform that cannot draw a choice SHALL fall back to the first value, divider, and state that in its README. |
DSL-14 | WHILE the list's separation is gap (DSL-13) THE description list SHALL leave comp.description-list.fact.gap.regular of empty space while density is regular, and comp.description-list.fact.gap.compact while density is compact, between every fact and the fact below it, SHALL draw none of the lines of DSL-12, and SHALL leave no such space above the first row or below the last; the facts SHALL stay exposed as facts (DSL-17). |
DSL-15 | THE description list, its facts, its terms and its values SHALL NOT take pointer, touch or keyboard input of their own, SHALL NOT take focus or be a stop in the focus order, and SHALL NOT change anything they draw under a pointer, a press or focus: a fact has no hovered, focused, pressed, selected or disabled state, draws no state layer and no focus indicator, and the list emits no event. |
DSL-16 | WHEN the facts, a term or a value change THE description list SHALL draw the new content at once, without a motion, lay itself out again where a width changed with it (DSL-3, DSL-4, DSL-7), and SHALL NOT announce the change by itself. |
DSL-17 | THE description list SHALL be exposed to assistive technology as terms each followed by the value or values that answer it, every value associated with its term, in the order given: on a platform that has the semantics of a description list, as that structure; on a platform that has none, each fact as one element whose text is the term followed by its values, set apart so that they are read as separate phrases ("Category, Actions"), with whatever inside the fact takes input still reached as an element of its own. The layout, the number of columns, the density, the separation and the order DSL-6 draws SHALL change nothing that is exposed; THE description list SHALL give a term no heading role and itself no name. |
DSL-18 | THE description list SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the description list is shown THE description list SHALL draw itself for the new direction at once, without a motion of its own, keeping what it shows. |
DSL-19 | WHERE the layout direction is right-to-left THE description list SHALL place the term column at the right and the value column at its left, begin every term and every value at the right edge of its column, fill its columns of facts from the right, and apply every gap by logical start and end. It draws no glyph of its own, so nothing in it is mirrored but its order. |
DSL-20 | THE description list SHALL lay out the text of each term and of each value as text of its own direction, isolated from the text beside it: it takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right name, an identifier, a number with its sign, unit or currency, a version, an address and a date keep their own order in a right-to-left layout and reorder nothing beside them; THE description list SHALL place that text and align its lines by the layout direction, not by the text's own, and SHALL NOT reverse the digits of a number. |
DSL-21 | WHILE the text size is enlarged THE description list SHALL grow every text style with it, keep its gaps and its lines, take comp.description-list.column.min-width as grown by the same factor, and lay itself out again by DSL-3, DSL-4 and DSL-7, so that an inline list draws its terms above their values and a list in columns draws fewer of them where the larger text no longer fits; it SHALL cut no content, SHALL set no fixed height on a fact, SHALL lose no content when the reader raises line height, paragraph spacing, letter spacing or word spacing, and SHALL need no sideways scrolling at a width of 320 points with text at 200 %. |
DSL-22 | WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE description list SHALL draw the lines of DSL-12 in the platform's text color and its terms and values in that color, a term still told from its value by its text style and its place; it draws no fill, so nothing else changes. |
DSL-23 | WHEN density names a value that the active design system does not have, or layout names a value this spec does not have, THE description list SHALL render with the default value (the default density's tokens, layout inline), and in debug builds report the unknown value. |
DSL-24 | WHEN its inline size changes THE description list SHALL choose between terms beside and above their values again from the new size. |
प्लैटफ़ॉर्म के अनुसार नामों का मिलान
पैरिटी का मतलब एक जैसे API नहीं है। हर प्लैटफ़ॉर्म एक ही कॉन्ट्रैक्ट को अपने तरीक़े से व्यक्त करता है।
| स्पेक | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| कंपोनेंट | tanrei-description-list | TanreiDescriptionList | TanreiDescriptionList | TanreiDescriptionList | DescriptionList |
layout · प्रॉपर्टी | layout | layout | layout | layout | layout |
columns · प्रॉपर्टी | columns | columns | columns | columns | columns |
density · प्रॉपर्टी | density | density | density | density | density |
separation · प्रॉपर्टी | separation | separation | separation | separation | separation |
| टिप्पणियाँ | It is the form the table takes. <tanrei-description-list> is a custom element with **no shadow root**, wrapped around the product's native <dl>, which stays in the light DOM — <tanrei-description-list layout="stacked" columns="3"><dl><div><dt>Category</dt><dd>Actions</dd></div>…</dl></tanrei-description-list>. The dl, dt and dd are never given a role, so the description-list semantics are the browser's own, for a screen reader, a crawler and a page without script alike (DSL-17). Everything drawn comes from one stylesheet, @tanrei/web/description-list.css, whose selectors start at tanrei-description-list and are wrapped in :where(); it styles the page before and without script (an element that is not yet defined is still an element), and the element adopts the same sheet into the root it is connected to, so it also works inside another component's shadow root. Props are attributes of the wrapper: layout, columns, density, separation. The wrapper is display: block; container-type: inline-size with no margin; the dl has its browser margins removed and every dd its inset. inline (DSL-3): the dl is a grid of max-content minmax(0, 1fr) and each group a subgrid row spanning both tracks, align-items: first baseline. DSL-4 needs the widest term's width, which CSS cannot compare with the container's: the element watches its own box and its terms with a ResizeObserver and sets data-stacked while the value column would be under the least width; without script the term track is fit-content(50%), so a list that is too narrow wraps its terms instead of stacking — nothing is cut. stacked and stat columns (DSL-7) are pure CSS: grid-template-columns: repeat(auto-fit, minmax(min(100%, max(<least width>, (100% - (n - 1) * <gap>) / n)), 1fr)), n coming from attribute selectors for columns 2 to 6 and from a custom property the element sets for larger numbers; auto-fit already draws no more columns than facts. The least width is the token multiplied by the reader's text scale (the root font size over 16), so that it grows with enlarged text (DSL-21). stat (DSL-6): each group is a column-direction flex box with order on the dd:first-of-type, so the dt stays before its dd in the document while the figure is drawn first. Lines (DSL-12) are border-block-start on each group with the same negative margin and overflow: clip on the dl, so the first row's lines are not drawn and no script counts rows. font-variant-numeric: tabular-nums and overflow-wrap: anywhere on dd (DSL-2, DSL-8); unicode-bidi: plaintext on dt and dd (DSL-20); under :lang(ja, zh, ko) a stat figure's letter-spacing is 0 and line-break: strict applies. Under forced-colors: active the lines are CanvasText (DSL-22). A dl without groups — bare dt and dd children, as some Markdown extensions emit — is drawn in one column, inline or stacked, with the line above each dt that follows a dd; columns and stat need the groups, and debug builds say so. Tanrei does not transform content: nothing wraps a bare dl by itself. Inside .tanrei-prose the element is an island by its tag name (PRS-16): prose spaces it and styles nothing inside it, while a bare dl beside it stays prose's (PRS-13). | Proposed spelling, for the platform's agent to settle. TanreiDescriptionList(layout: .stacked, columns: 3, density:, separation:) { TanreiFact("Category", value: "Actions"); TanreiFact("Status") { TanreiTag("Stable", status: .success, size: .small) } }. A custom Layout measures the terms once (DSL-3), compares what is left with the least width (DSL-4) and places the facts in equal columns (DSL-7); it is proposed its own width, so the decision is the container's. The least width is a @ScaledMetric. Not a Form, a LabeledContent or a List: each brings a look, insets or a row behaviour of its own. Accessibility: SwiftUI has no description-list container, so DSL-17's fallback applies — each fact is accessibilityElement(children: .combine) with the term's text before the values', a control inside a value stays an element of its own, and the stat layout sorts the term first with accessibilitySortPriority. | Proposed spelling, for the platform's agent to settle. TanreiDescriptionList(layout = Stacked, columns = 3) { fact("Category", "Actions"); fact("Status") { value { TanreiTag("Stable", status = Success, size = Small) } } }. A custom Layout (or SubcomposeLayout) measures the terms' intrinsic widths, decides DSL-4 and DSL-7 from its own constraints, and aligns the first baselines; the least width is converted with the font scale. No ListItem: it is a pressable row with a look of its own. Semantics: each fact is semantics(mergeDescendants = true) with a contentDescription of the term and its values joined by commas, the term first in every layout; a clickable inside a value is not merged. | Proposed spelling, for the platform's agent to settle. TanreiDescriptionList(layout: TanreiDescriptionListLayout.stacked, columns: 3, facts: [TanreiFact(term: "Category", value: "Actions")]). A LayoutBuilder gives the list its own width; the term column is measured with a TextPainter over the terms (or a custom RenderBox with intrinsic widths where a term holds a widget), and the least width is multiplied by the TextScaler. Not a Table, a ListTile or a DataTable. Semantics: one MergeSemantics per fact with a label of the term and its values joined by commas and sortKeys that put the term first in the stat layout; a control inside a value keeps its own node. | Proposed spelling, for the platform's agent to settle. <DescriptionList layout="stacked" columns={3}><DescriptionList.Fact term="Category">Actions</DescriptionList.Fact></DescriptionList>. The list's own width comes from onLayout, and the widest term from a first measuring pass, so the first frame of an inline list is drawn after measuring; columns are flexBasis percentages computed from that width, and the least width is multiplied by the font scale. Each fact is one accessible view with accessibilityRole="text" and an accessibilityLabel of the term and its values joined by commas, the term first in every layout; a pressable inside a value stays its own element. Follows the app's direction where an ancestor's is not known. |
टोकन
| टोकन | किसका एलियास | रिज़ॉल्व किया गया मान (लाइट) |
|---|---|---|
--tanrei-comp-description-list-column-gap | sys.space.space400 | 32px |
--tanrei-comp-description-list-column-min-width | — | 144px |
--tanrei-comp-description-list-divider-color | sys.color.outline-variant | |
--tanrei-comp-description-list-divider-thickness | sys.border.hairline | 1px |
--tanrei-comp-description-list-fact-gap-compact | — | 6px |
--tanrei-comp-description-list-fact-gap-regular | — | 12px |
--tanrei-comp-description-list-separation | sys.behavior.separation | 0 |
--tanrei-comp-description-list-stack-gap | sys.space.space50 | 4px |
--tanrei-comp-description-list-term-color | sys.color.on-surface-variant | |
--tanrei-comp-description-list-term-gap-compact | sys.space.space100 | 8px |
--tanrei-comp-description-list-term-gap-regular | sys.space.space200 | 16px |
--tanrei-comp-description-list-value-color | sys.color.on-surface | |
--tanrei-comp-description-list-stat-value-typescale-compact | sys.typescale.heading-3 | 500 20px/1.4 |
--tanrei-comp-description-list-stat-value-typescale-regular | sys.typescale.heading-1 | 500 32px/1.25 |
--tanrei-comp-description-list-term-typescale-compact | sys.typescale.label-small | 500 12px/1.3333 |
--tanrei-comp-description-list-term-typescale-regular | sys.typescale.label | 500 14px/1.4286 |
--tanrei-comp-description-list-value-typescale-compact | sys.typescale.body-small | 400 13px/1.5385 |
--tanrei-comp-description-list-value-typescale-regular | sys.typescale.body | 400 14px/1.5714 |
फ़िक्स्चर
मानक रेंडरिंग। हर प्लैटफ़ॉर्म हर फ़िक्स्चर का स्नैपशॉट एक ही ID से लेता है, ताकि नतीजों की तुलना की जा सके।
density: regular (22)
inline
items: 4 inline-long-values
items: 3 inline-falls-back
items: 2 stacked
layout: stacked items: 3 several-values
items: 3 tags
items: 4 empty-value
items: 4 unbreakable
items: 2 columns
layout: stacked columns: 3 items: 3 columns-legend
layout: stacked columns: 3 items: 6 stat
layout: stat columns: 4 items: 4 stat-single
layout: stat items: 1 stat-note
layout: stat columns: 2 items: 2 separation-divider
separation: divider items: 4 separation-gap
separation: gap items: 4 separation-divider-columns
layout: stacked columns: 2 separation: divider items: 4 separation-gap-stat
layout: stat columns: 4 separation: gap items: 4 japanese
items: 4 japanese-stat
layout: stat columns: 4 items: 4 rtl
direction: rtl items: 4 rtl-stat
layout: stat columns: 3 direction: rtl items: 3 ltr-values-rtl
direction: rtl items: 3 density: compact (4)
inline-compact
density: compact items: 5 stacked-compact
layout: stacked density: compact items: 3 columns-compact
layout: stacked columns: 4 density: compact items: 4 stat-compact
layout: stat columns: 3 density: compact items: 3 इससे जनरेट किया गया: specs/description-list.spec.json, tokens/comp/description-list.tokens.json, design/tokens/
- इसे एक चीज़ के तथ्यों के लिए इस्तेमाल करें। जिन कई चीज़ों के तथ्यों के नाम एक जैसे हैं, वे एक टेबल हैं, जिसके हेडर कॉलम को नाम देते हैं।
- जो टेक्स्ट शब्दों को समझाता है और पैराग्राफ़ के बीच क्रम से पढ़ा जाता है, वह प्रोज़ है: उसे अपने कॉन्टेंट में सादी
<dl>ही रहने दें। प्रोज़ उसे चलते टेक्स्ट के रूप में सेट करता है, जिसमें टर्म उभरकर दिखता है। यह कंपोनेंट उसी लिस्ट का लेआउट में रखा गया रूप है, जिसमें मान उभरकर दिखता है। - जिस लिस्ट में से व्यक्ति कुछ चुनता या दबाता है, वह लिस्ट है।
लिस्ट सब कुछ अपनी चौड़ाई से तय करती है, विंडो की चौड़ाई से कभी नहीं। वही लिस्ट पेज, कार्ड, साइड पैनल और डायलॉग, सबमें ठीक बैठती है।
- Inline लेआउट अपने आप एक के ऊपर एक हो जाता है। जब सबसे चौड़े टर्म के बग़ल में मानों के लिए 144 से कम जगह बचती है, तब हर तथ्य अपने टर्म को मान के ऊपर रखकर बनता है, सभी एक साथ, और जगह होने पर फिर दो कॉलम में लौट आता है। जब भी लिस्ट की चौड़ाई बदलती है, वह फिर से तय करती है, तब भी जब वह पहली बार बिना चौड़ाई के बनी हो, किसी ऐसे पैनल या टैब में जो अभी दिखाया नहीं गया था। छोटी विंडो के लिए लेआउट ख़ुद न बदलें।
- कॉलम अपने आप कम होते हैं।
columnsकॉलम की वह सबसे बड़ी गिनती है जो stacked और stat लेआउट बनाते हैं। हर कॉलम कम से कम 144 चौड़ा होता है, इसलिए चार आँकड़े चौड़े पेज में चार कॉलम होते हैं, सँकरे पेज में दो-दो, और फ़ोन पर एक कॉलम। लिस्ट कभी उतने से ज़्यादा कॉलम नहीं बनाती जितने उसमें तथ्य हैं। - Inline लिस्ट एक कॉलम है।
columnsका उस पर कोई असर नहीं होता। - कुछ नहीं काटा जाता। मान रैप होते हैं। जो आइडेंटिफ़ायर या पता टूट नहीं सकता, वह कॉलम के किनारे पर तोड़ा जाता है। लिस्ट कभी आड़ी स्क्रॉल नहीं होती।
density |
टर्म और मान | तथ्यों के बीच | किसके लिए |
|---|---|---|---|
regular (डिफ़ॉल्ट) |
20 की लाइन हाइट पर 14, और 22 पर 14 | 12; रेखा हो तो उसके दोनों ओर 12 | वे तथ्य जिन्हें व्यक्ति पढ़ता है: पेज, कार्ड, डायलॉग। |
compact |
16 पर 12, और 20 पर 13 | 6; रेखा हो तो उसके दोनों ओर 6 | वे तथ्य जिन पर व्यक्ति नज़र दौड़ाता है: साइड पैनल, इंस्पेक्टर। |
stat का आँकड़ा regular में 40 पर 32 है, और compact में 28 पर 20।
separation |
क्या बनाता है |
|---|---|
auto (डिफ़ॉल्ट) |
जो डिज़ाइन सिस्टम ने चुना है: डिफ़ॉल्ट सिस्टम में एक बारीक रेखा। |
divider |
एक तथ्य और उसके नीचे वाले तथ्य के बीच एक बारीक रेखा। |
gap |
ख़ाली जगह, और कोई रेखा नहीं। |
पहली पंक्ति के ऊपर, आख़िरी पंक्ति के नीचे, दो कॉलम के बीच या टर्म और उसके मान के बीच कोई रेखा नहीं होती। फ़्रेम वाली लिस्ट outlined कार्ड में रखी लिस्ट है।
- टर्म को जितना हो सके उतना छोटा रखें: “डिलीवरी का पता”, “वह पता जहाँ यह ऑर्डर भेजा जाएगा” नहीं।
- जहाँ किसी चीज़ का न होना ही जानकारी है, वहाँ उसे शब्दों में लिखें: “कोई नहीं”, “सेट नहीं है”, “असीमित”।
- बदलाव को शब्दों में कहें: आँकड़े के नीचे दूसरे मान के रूप में “पिछले हफ़्ते से 12% ज़्यादा”।
- मान में स्थिति के लिए छोटा टैग (
size="small") इस्तेमाल करें, ताकि वह अपनी पंक्ति को ऊँचा न करे।
- टर्म के बाद कोलन न लगाएँ। विराम चिह्न भाषा के होते हैं, और टर्म पहले ही स्टाइल और जगह से अपने मान से अलग दिखता है।
- ख़ाली मान में डैश न रखें। उसे ख़ाली छोड़ें, या न होना शब्दों में लिखें।
- कोई आँकड़ा अच्छा है या बुरा, यह बताने के लिए उसे रंग न दें। दिशा एक शब्द है, या ऐसा टैग जिसका लेबल उसे बताता है।
- असंबंधित चीज़ों को अगल-बग़ल रखने के लिए लिस्ट इस्तेमाल न करें। वह लेआउट का काम है।
- रोल
none- लेबलिंग
- WAI-ARIA has no role for a description list as a whole, only for its parts (term, definition), so the component names none: on the web the product's own dl, dt and dd stay in the document and carry the structure; elsewhere each fact is one element read "term, value" (DSL-17). The list has no accessible name of its own: the heading above it says what the facts are about, as it does for a person who sees them.
- न्यूनतम टार्गेट
- दिखने वाला आकार छोटा होने पर भी हिट एरिया न्यूनतम टार्गेट साइज़ को पूरा करता है। minimum 32px · pointer 44px · spacing 8px · touch 48px
कीबोर्ड
| कुंजियाँ | क्रिया |
|---|
टिप्पणियाँ
- Not interactive: the list, its facts, its terms and its values take no input and no focus (DSL-15), so there is no target to size. minimumTarget holds trivially. What is pressable inside a value — a link, a button, a copy button — meets the minimum target by its own spec and keeps its place in the focus order.
- A description list is for the facts of one thing (WCAG 1.3.1): each term names what its value is. Several things that share the same names are a table, whose headers name columns; text that is read in order, with a term now and then, is prose, which sets a bare description list as running text (PRS-13). Do not use this component to place unrelated things side by side.
- Every value has a term, and a term is a name, not a heading: it takes no heading role (DSL-17), so a screen reader's list of headings is not filled with "Size", "Owner" and "Date". A block of facts that needs a title gets a heading above it, which the product writes.
- What is drawn first is not always what is read first: the stat layout draws the figure above its label and still exposes "orders this week, 1,284" (DSL-6). Both orders are a meaningful sequence (WCAG 1.3.2); the exposed one is the same in every layout, so that a person hears a list the same way wherever it is drawn.
- An empty value is exposed as empty (DSL-11). Where the absence itself is information ("None", "Not set", "Unlimited"), write it as the value, in words: a dash is read as punctuation or not at all.
- Meaning never rests on color. A figure is the surface's text color whatever it says; a change (up, down, better, worse) is a tag or text in the value whose words say the direction ("up 12 % since last week"), with a glyph if the product wants one, never a color alone (WCAG 1.4.1).
- Reflow (WCAG 1.4.10) and enlarged text (1.4.4, 1.4.12): the list decides its layout from its own width, so the same rules that stack it in a narrow panel stack it at 200 % text and in a 320 wide window (DSL-4, DSL-7, DSL-21). Nothing is cut and nothing scrolls sideways; an unbreakable value is broken at the edge (DSL-8).
- Contrast in the default system: a value is on-surface and a term on-surface-variant, each held to 4.5:1 on every surface and container step by the token invariants. The line between facts is decorative: facts are exposed without it.
- A list does not announce a change of its facts (DSL-16). Where a change must be heard (a figure that updates while the person watches), the product puts the list, or the one fact, in a live region and decides how often it speaks.
इससे जनरेट किया गया: specs/description-list.spec.json, tokens/sys/measure.tokens.json
- नेटिव लिस्ट एक डिस्क्रिप्शन लिस्ट ही रहती है: टर्म और उनकी परिभाषाएँ ब्राउज़र की अपनी हैं, हर लेआउट में, दोनों डेंसिटी में, रेखाओं के साथ या उनके बिना।
- पढ़ा जाने वाला क्रम कभी नहीं बदलता। stat लेआउट आँकड़े को उसके लेबल के ऊपर बनाता है, और सहायक तकनीक को तब भी टर्म पहले देता है।
- लिस्ट की कोई चीज़ फ़ोकस या इनपुट नहीं लेती। मान के भीतर का लिंक या बटन अपना टार्गेट और फ़ोकस के क्रम में अपनी जगह बनाए रखता है।
- 200% टेक्स्ट पर और 320 चौड़ी विंडो में चौड़ाई के वही नियम लिस्ट को एक के ऊपर एक कर देते हैं और उसके कॉलम कम कर देते हैं। न्यूनतम चौड़ाई टेक्स्ट के साथ बढ़ती है।
- दाएँ से बाएँ वाले लेआउट में टर्म का कॉलम दाईं ओर होता है और कॉलम दाईं ओर से भरते हैं। हर टर्म और मान अपनी दिशा बनाए रखता है, इसलिए कोई वर्शन, पता या रक़म कभी उलटी नहीं होती।
- फ़ोर्स्ड कलर्स में रेखाएँ और टेक्स्ट, दोनों टेक्स्ट के रंग के होते हैं। लिस्ट में ऐसा कोई फ़िल नहीं है जो खो जाए।
- बिना टर्म का मान, inline लिस्ट पर
columns, कॉलम की ऐसी गिनती जो पूरी संख्या नहीं है, बिना ग्रुप वाली लिस्ट पर stat लेआउट या कॉलम, और अनजान layout, density या separation डीबग बिल्ड में रिपोर्ट किए जाते हैं।
- लिस्ट के ऊपर ऐसी हेडिंग रखें जो बताए कि तथ्य किस बारे में हैं। लिस्ट का अपना कोई नाम नहीं होता, और टर्म कभी हेडिंग नहीं होता।
- हर मान को एक टर्म दें।
- जहाँ कोई आँकड़ा व्यक्ति के देखते-देखते बदलता है और वह बदलाव सुनाई देना ज़रूरी है, वहाँ लिस्ट को या उस एक तथ्य को अपने लाइव रीजन में रखें। लिस्ट बदलावों को पढ़कर नहीं सुनाती।