Search the documentation

Type to search page titles, component names and descriptions.

    Data Display

    Formatted values

    Dates, numbers and money in the reader's locale.

    import { FormattedDate, FormattedMoney, FormattedNumber } from 'faifo-design'

    FormattedDate, FormattedNumber and FormattedMoney render a value in the reader's locale with the right semantics, so the same amount looks the same in a table, a card and a record.

    #When to use

    • Use them wherever a value is displayed rather than formatting strings by hand.
    • Numbers in tables are tabular and right-aligned by the column, not by the formatter.

    #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" />,
              },
            ]}
          />,
        ]}
      />
    )

    #API

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

    #FormattedDateComponent

    PropertyDescriptionTypeDefault
    valuerequired–string–
    locale–string'vi-VN'
    emptyLabel–string'—'

    #FormattedMoneyComponent

    PropertyDescriptionTypeDefault
    valuerequiredDecimal text preserves database precision beyond Number.MAX_SAFE_INTEGER.number | string–
    currencyrequired–string–
    locale–string'vi-VN'

    #FormattedNumberComponent

    PropertyDescriptionTypeDefault
    valuerequired–number–
    locale–string'vi-VN'
    minimumFractionDigits–number–
    maximumFractionDigits–number–

    #Hooks

    The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.

    • formatted-date
    • formatted-number
    • formatted-money