Search the documentation

Type to search page titles, component names and descriptions.

    Data Entry

    TimeframeFilter

    The period a screen reports on.

    import { TimeframeFilter } from 'faifo-design'

    TimeframeFilter chooses the period of a report. Every option is a link, and the resolved range and the time the figures were built sit beside it.

    #When to use

    • Use it above a dashboard or a report.
    • It is a filter, not navigation. A row of periods drawn as tabs reads as five screens rather than one screen under five constraints.

    #Examples

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

    #Timeframe filter

    The period a screen reports on: every option is a link, with the resolved range and build time beside it.

    Report periodLast 30 days
    2026-08-06 → 2026-09-04Updated 2026-09-04 09:40Asia/Ho_Chi_Minh
    Show codeHide code
    import { TimeframeFilter } from 'faifo-design'
    
    export const Example = () => (
      <TimeframeFilter
        id="specimen-period"
        label="Report period"
        options={[
          { id: 'today', label: 'Today', href: '#timeframe-filter' },
          { id: 'last_7_days', label: 'Last 7 days', href: '#timeframe-filter' },
          { id: 'last_30_days', label: 'Last 30 days', href: '#timeframe-filter', active: true },
          { id: 'this_month', label: 'This month', href: '#timeframe-filter' },
        ]}
        range="2026-08-06 → 2026-09-04"
        asOf="2026-09-04 09:40"
        asOfLabel="Updated"
        note="Asia/Ho_Chi_Minh"
      />
    )

    #API

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

    #TimeframeFilterComponent

    The period a screen is reporting on. A filter, not navigation: tabs mean sibling views, and a row of periods read as tabs looks like five screens rather than one screen under five constraints. Every option is a link, so the choice survives a copied URL and needs no script. The resolved range and the build time sit beside the choice, because a period label alone does not say what a number covers.

    PropertyDescriptionTypeDefault
    idrequired–string–
    labelrequiredWhat is being filtered, e.g. "Reporting period". Also the group's label.string–
    optionsrequired–readonly TimeframeOption[]–
    rangeThe range the active option resolves to, e.g. "2026-08-06 → 2026-09-05".string | null–
    asOfWhen the figures were computed, and the words for it.string | null–
    asOfLabel–string | null–
    noteTrailing note, e.g. the timezone the range is expressed in.string | null–

    #Types

    #TimeframeFilterProps

    The properties of TimeframeFilter, listed above.

    #TimeframeOption

    PropertyDescriptionTypeDefault
    idrequired–string–
    labelrequired–string–
    hrefrequired–string–
    active–boolean–
    detailShown under the option, e.g. the dates the preset resolves to.string | null–

    #Hooks

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

    • timeframe
    • timeframe-menu
    • timeframe-trigger
    • timeframe-label
    • timeframe-value
    • timeframe-content
    • timeframe-option
    • timeframe-option-label
    • timeframe-option-detail
    • timeframe-range
    • timeframe-asof
    • timeframe-note