Search the documentation

Type to search page titles, component names and descriptions.

    Data Display

    DescriptionList

    The facts of a record as labelled pairs.

    import { DescriptionList, KeyValue } from 'faifo-design'

    DescriptionList shows label and value pairs: in columns, or as one strip divided by hairlines under a record title. KeyValue is a single pair.

    #When to use

    • Use it for read-only facts of a record. Editable values belong in a RecordForm.
    • columns="auto" fits columns to the width of the list, so lists of the same width align.

    #Examples

    Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.

    #Record facts and formatted values

    Identity, status and locale-aware values remain small, reusable display primitives.

    Ngọc LinhSales operations+1Ready
    Delivery date
    Quantity
    1.200
    Total
    18.450.000 ₫
    Show codeHide code
    import { AvatarGroup, DescriptionList, FormattedDate, FormattedMoney, FormattedNumber, Inline, Person, Stack, Status } from 'faifo-design'
    
    export const Example = () => (
      <Stack
        items={[
          <Inline
            items={[
              <Person name="Ngọc Linh" detail="Sales operations" />,
              <AvatarGroup
                label="Order collaborators"
                people={[
                  { id: 'linh', name: 'Ngọc Linh' },
                  { id: 'minh', name: 'Minh Anh' },
                  { id: 'ha', name: 'Thu Hà' },
                  { id: 'nam', name: 'Hoàng Nam' },
                  { id: 'vy', name: 'Thảo Vy' },
                ]}
                max={4}
              />,
              <Status label="Ready" tone="positive" />,
            ]}
          />,
          <DescriptionList
            columns={3}
            items={[
              { id: 'date', label: 'Delivery date', value: <FormattedDate value="2026-09-08" /> },
              { id: 'quantity', label: 'Quantity', value: <FormattedNumber value={1200} /> },
              {
                id: 'total',
                label: 'Total',
                value: <FormattedMoney value={18450000} currency="VND" />,
              },
            ]}
          />,
        ]}
      />
    )

    #Record facts that fill the row

    columns="auto" fits 12rem columns to the list width, up to four, so lists of one width align.

    Arrival
    Departure
    Nights
    2
    Guests
    2 adults
    Rate plan
    Flexible with breakfast
    Source
    Direct
    Property
    Harbour View Resort
    Room
    Not assigned
    Show codeHide code
    import { DescriptionList, FormattedDate, FormattedNumber, Stack } from 'faifo-design'
    
    export const Example = () => (
      <Stack
        divided
        items={[
          <DescriptionList
            columns="auto"
            items={[
              { id: 'arrival', label: 'Arrival', value: <FormattedDate value="2026-09-04" /> },
              { id: 'departure', label: 'Departure', value: <FormattedDate value="2026-09-06" /> },
              { id: 'nights', label: 'Nights', value: <FormattedNumber value={2} /> },
              { id: 'guests', label: 'Guests', value: '2 adults' },
              { id: 'rate', label: 'Rate plan', value: 'Flexible with breakfast' },
              { id: 'source', label: 'Source', value: 'Direct' },
            ]}
          />,
          <DescriptionList
            columns="auto"
            items={[
              { id: 'property', label: 'Property', value: 'Harbour View Resort' },
              { id: 'room', label: 'Room', value: 'Not assigned' },
            ]}
          />,
        ]}
      />
    )

    #API

    Generated from the package source. A property without a description has none in the source yet.

    #DescriptionListComponent

    layout="strip" lays the pairs out in one row divided by hairlines, the metadata strip of Faifo Design visual contract L7 (due date, SLA, owner under a record title). It has no box around it; columns applies to the grid layout only. columns="auto" fits as many 12rem columns as the list's own width holds, at most four: the facts of a wide record page fill the row instead of leaving half of it empty.

    PropertyDescriptionTypeDefault
    label–string–
    itemsrequired–readonly (KeyValueProps & { id: string })[]–
    columns–1 | 2 | 3 | 'auto'2
    layout–'grid' | 'strip'–

    #KeyValueComponent

    PropertyDescriptionTypeDefault
    labelrequired–JSXChild–
    valuerequired–JSXChild–
    emptyLabel–string'—'

    #Types

    #KeyValueProps

    The properties of KeyValue, listed above.