Lista de descripciones
Presenta lo que se sabe de una cosa como datos con nombre, un término discreto y el valor que le responde, con los términos al lado de sus valores, encima de ellos o debajo de una cifra grande. Se dispone según su propia anchura y nunca es un control.
- Categoría
- Contención
- Tokens
comp.description-list- Nivel
- Base
- Web
tanrei-description-listschedule - SwiftUI
TanreiDescriptionListradio_button_unchecked - Jetpack Compose
TanreiDescriptionListradio_button_unchecked - Flutter
TanreiDescriptionListradio_button_unchecked - React Native
DescriptionListradio_button_unchecked
Generado a partir de docs/status/status.json, specs/description-list.spec.json
Los datos de un pedido
- Pedido
- A-20418
- Realizado
- 6 de octubre de 2026
- Enviar a
- 4-2-8 Shibakoen, Minato, Tokio
- Estado
- Total
- 12 800 ¥
Una lista de descripciones muestra los datos de una sola cosa: un pedido, un archivo, una cuenta, un componente. Cada dato es un término y el valor que le responde. El término es una etiqueta discreta; el valor es lo que la persona venía a buscar.
Tres disposiciones dibujan los mismos datos:
layout |
Qué dibuja | Úsalo para |
|---|---|---|
inline (predeterminado) |
El término al lado de su valor. Todos los términos están en una sola columna, tan ancha como el término más ancho. | Un bloque de datos en el que una persona consulta cosas. |
stacked |
El término encima de su valor. | Valores largos o términos largos, y datos en varias columnas. |
stat |
Primero el valor, como una cifra grande, con el término debajo como su etiqueta. | Los pocos números con los que se abre una pantalla. |
En la web es <tanrei-description-list> alrededor de tu propia <dl> nativa. El elemento no tiene shadow root y no da ningún rol a la lista, así que un lector de pantalla, un rastreador y una página sin script se encuentran con una lista de descripciones HTML corriente. Las demás plataformas todavía no la han implementado.
<link rel="stylesheet" href="@tanrei/web/description-list.css" />
<tanrei-description-list>
<dl>
<div><dt>Pedido</dt><dd>A-20418</dd></div>
<div><dt>Responsables</dt><dd>Aiko Tanaka</dd><dd>Samir Haddad</dd></div>
<div>
<dt>Estado</dt>
<dd><tanrei-tag size="small" status="success" label="Enviado"></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 dibuja toda la lista antes de que se ejecute ningún script. El elemento añade por sí solo la misma hoja de estilos a la página, así que una página que solo carga el script también obtiene una lista dibujada, un momento después.
| Parte | En la web |
|---|---|
| Un dato | Un <div> dentro de la <dl>, alrededor de un <dt> y sus <dd>. |
| Un término | El <dt>. Texto, o un componente que el valor explica (un tag en una leyenda). No escribas dos puntos. |
| Un valor | Un <dd>. Texto, un componente o nada. |
| Varios valores | Varios <dd> en un mismo dato. Cada uno se dibuja en una línea propia. |
Una <dl> sin los grupos <div>, como la escriben algunos renderizadores de Markdown, se dibuja igualmente en una columna, en línea o apilada. columns y la disposición stat necesitan los grupos.
Stat: los números con los que se abre una pantalla
- pedidos esta semana
- 1284
- un 12% más que la semana pasada
- entregados a tiempo
- 98.6%
- mediana del tiempo de compilación
- 4 min 12 s
Apilada en columnas: menos columnas cuando la lista es estrecha
- Planificado
- Especificado; todavía no implementado en esta plataforma.
- Rezagado
- Implementado, pero por detrás de la especificación actual.
- Alpha
- Implementado y con pruebas; la API todavía puede cambiar.
- Beta
- La API está asentada; se piden informes del uso real.
- Stable
- Cubierto por el compromiso de versionado.
- Obsoleto
- Se sigue distribuyendo; se indica qué lo sustituye.
Compacta y separada por espacio: datos que se recorren con la vista
- Valor
- #1b1c1e
- → ref.palette.neutral.10
- Tipo
- alias · color
- Descripción
- Texto y glifos sobre cualquier superficie o contenedor de superficie.
Anatomía
| Parte | Descripción |
|---|---|
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 · opcional | The one hairline between a fact and the fact below it, where facts are told apart by a line. |
Propiedades
| Propiedad | Tipo | Valor predeterminado | Descripción |
|---|---|---|---|
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). |
Elementos
Los tipos de elemento que el componente repite. Un fixture enumera sus elementos en orden; cada plataforma nombra cada tipo según su propio estilo.
fact · grupo: contiene elementos
One fact: a term, and the value or values that answer it.
| Propiedad | Tipo | Valor predeterminado | Descripción |
|---|---|---|---|
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"). |
| Slot | Descripción |
|---|---|
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). |
| Especificación | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| Elemento | div | TanreiFact | fact | TanreiFact | DescriptionList.Fact |
term · Propiedad | dt | term | term | term | term |
| Notas | 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 · grupo: contiene elementos
One value of a fact: plain text, a component of the product's, or nothing.
| Slot | Descripción |
|---|---|
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). |
| Especificación | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| Elemento | dd | TanreiFactValue | value | TanreiFactValue | DescriptionList.Value |
| Notas | 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.
| Propiedad | Tipo | Valor predeterminado | Descripción |
|---|---|---|---|
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. |
| Especificación | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| Elemento | tanrei-tag | TanreiTag | TanreiTag | TanreiTag | Tag |
label · Propiedad | label | title | label | label | label |
variant · Propiedad | variant | variant | variant | variant | variant |
status · Propiedad | status | status | status | status | status |
size · Propiedad | size | size | size | size | size |
Estados
Comportamiento
Requisitos en formato EARS. Cada implementación de plataforma se prueba contra estos identificadores. El texto de los requisitos se muestra tal como está en la especificación, en inglés.
| ID | Requisito |
|---|---|
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. |
Correspondencia de nombres por plataforma
Paridad no significa API idénticas. Cada plataforma expresa el mismo contrato con su propio estilo.
| Especificación | Web | SwiftUI | Jetpack Compose | Flutter | React Native |
|---|---|---|---|---|---|
| Componente | tanrei-description-list | TanreiDescriptionList | TanreiDescriptionList | TanreiDescriptionList | DescriptionList |
layout · Propiedad | layout | layout | layout | layout | layout |
columns · Propiedad | columns | columns | columns | columns | columns |
density · Propiedad | density | density | density | density | density |
separation · Propiedad | separation | separation | separation | separation | separation |
| Notas | 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. |
Tokens
| Token | Alias de | Valor resuelto (claro) |
|---|---|---|
--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 |
Fixtures
Representaciones canónicas. Todas las plataformas capturan cada fixture con el mismo identificador para poder comparar los resultados.
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 Generado a partir de specs/description-list.spec.json, tokens/comp/description-list.tokens.json, design/tokens/
- Úsala para los datos de una sola cosa. Varias cosas que comparten los mismos nombres son una tabla, cuyos encabezados dan nombre a las columnas.
- El texto que explica palabras y se lee en orden entre párrafos es prosa: déjalo como una
<dl>sin más en tu contenido. La prosa la compone como texto corrido, con el término destacado. Este componente es la forma dispuesta de la misma lista, con el valor destacado. - Una lista de la que una persona elige o que pulsa es una lista.
La lista lo decide todo a partir de su propia anchura, nunca de la de la ventana. La misma lista queda bien en una página, una tarjeta, un panel lateral y un diálogo.
- La disposición en línea se apila por sí sola. Cuando a los valores les quedaría menos de 144 al lado del término más ancho, todos los datos se dibujan con el término encima de su valor, todos a la vez, y la lista vuelve a las dos columnas cuando hay sitio. Lo decide de nuevo cada vez que cambia su ancho, también una lista que se dispuso primero sin ancho, en un panel o una pestaña que aún no se mostraba. No cambies tú la disposición para una ventana pequeña.
- Las columnas se reducen por sí solas.
columnses el máximo de columnas que dibujan las disposiciones apilada y stat. Cada columna tiene al menos 144 de ancho, así que cuatro cifras son cuatro columnas en una página ancha, dos y dos en una estrecha y una sola columna en un teléfono. Una lista nunca dibuja más columnas que datos tiene. - Una lista en línea es una sola columna.
columnsno tiene efecto en ella. - Nada se corta. Los valores saltan de línea. Un identificador o una dirección que no pueden partirse se parten en el borde de la columna. La lista nunca se desplaza hacia los lados.
density |
Término y valor | Entre datos | Úsalo para |
|---|---|---|---|
regular (predeterminado) |
14 sobre un interlineado de 20, y 14 sobre 22 | 12; con una línea, 12 a cada lado de ella | Datos que se leen: una página, una tarjeta, un diálogo. |
compact |
12 sobre 16, y 13 sobre 20 | 6; con una línea, 6 a cada lado de ella | Datos que se recorren con la vista: un panel lateral, un inspector. |
La cifra de la disposición stat es de 32 sobre 40 en regular y de 20 sobre 28 en compact.
separation |
Qué dibuja |
|---|---|
auto (predeterminado) |
Lo que eligió el sistema de diseño: una línea fina en el sistema predeterminado. |
divider |
Una línea fina entre un dato y el que tiene debajo. |
gap |
Espacio vacío y ninguna línea. |
No hay línea encima de la primera fila, debajo de la última, entre dos columnas ni entre un término y su valor. Una lista enmarcada es una lista dentro de una tarjeta con contorno.
- Haz que un término sea tan corto como pueda ser: «Enviar a», no «La dirección a la que se envía este pedido».
- Escribe una ausencia con palabras donde sea información: «Ninguno», «Sin definir», «Sin límite».
- Di un cambio con palabras: «un 12% más que la semana pasada» como segundo valor debajo de una cifra.
- Usa un tag pequeño (
size="small") para un estado dentro de un valor, de modo que no haga más alta su línea.
- No pongas dos puntos después de un término. La puntuación es cosa del idioma, y el término ya se distingue de su valor por el estilo y el lugar.
- No pongas un guion en un valor vacío. Déjalo vacío o escribe la ausencia.
- No des color a una cifra para decir que es buena o mala. Una tendencia es una palabra, o un tag cuya etiqueta la dice.
- No uses la lista para colocar una al lado de otra cosas que no guardan relación. Eso es diseño de página.
- Rol
none- Etiquetado
- 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.
- Objetivo mínimo
- El área de pulsación cumple el tamaño mínimo de objetivo aunque el tamaño visual sea menor. minimum 32px · pointer 44px · spacing 8px · touch 48px
Teclado
| Teclas | Acción |
|---|
Notas
- 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.
Generado a partir de specs/description-list.spec.json, tokens/sys/measure.tokens.json
- La lista nativa sigue siendo una lista de descripciones: los términos y sus definiciones son los del propio navegador, en todas las disposiciones, con cualquiera de las dos densidades, con líneas o sin ellas.
- El orden en que se lee nunca cambia. La disposición stat dibuja la cifra encima de su etiqueta y aun así expone primero el término.
- Nada de la lista recibe el foco ni entrada. Un enlace o un botón dentro de un valor conserva su propio objetivo y su lugar en el orden del foco.
- Con el texto al 200% y en una ventana de 320 de ancho, las mismas reglas de anchura apilan la lista y reducen sus columnas. La anchura mínima crece con el texto.
- En un diseño de derecha a izquierda, la columna de términos está a la derecha y las columnas se llenan desde la derecha. Cada término y cada valor conserva su propia dirección, de modo que una versión, una dirección postal y un importe nunca se invierten.
- Con colores forzados, las líneas y el texto tienen el color del texto. La lista no tiene ningún relleno que perder.
- Las compilaciones de depuración notifican un valor sin término,
columnsen una lista en línea, un número de columnas que no es entero, la disposición stat o las columnas en una lista sin grupos, y una disposición, una densidad o una separación desconocidas.
- Pon encima de la lista un encabezado que diga de qué tratan los datos. La lista no tiene nombre propio, y un término nunca es un encabezado.
- Da un término a cada valor.
- Donde una cifra cambie mientras una persona la mira y el cambio deba oírse, pon la lista o ese único dato en una región activa (live region) propia. La lista no anuncia los cambios.