Skip to content

List Toolbar ​

FTListToolbar is the layout of the controls above a list. It has four groups in one row or two, and a cover:

SlotContentOne rowstacked
modesThe mode tabs (FTTabs compound)Left, firstTop row, left
startThe filters (FTFilterBar)Left, after the modesSecond row, left
timeEvery time control as one group, with Refresh lastRight, firstTop row, right
endThe search, then the list actions (Export, Display)Right, lastSecond row, right
coverThe selection barOver the modes and the filtersOver the filters

One row wraps when it does not fit: the right side moves under the left side and stays on the right. Use stacked when the page shows two rows.

While covered, the cover fills the area it lies over, and the controls under it cannot be reached. The time and end groups stay usable. Stacked, the tabs stay visible: the page sets their own disabled state. A page without rows selected shows no cover.

Contract: src/components/FTListToolbar/contract.ts (a composition, status: draft). History: contract-log.md.

Basic usage ​

Select rows with the button below to see the cover. Switch to two rows with the toggle.

vue
<template>
  <FTListToolbar :covered="selectedCount > 0" :stacked="twoRows" label="Bonus list controls">
    <template #modes>
      <!-- stacked and covered: every tab has disabled: true -->
      <FTTabs tabStyle="compound" :tabs="modeTabs" @tab-click="onMode" />
    </template>
    <template #start>
      <FTFilterBar
        :filters="filters"
        :pinned="pinned"
        :disabled="selectedCount > 0"
        @update="update"
        @clear="clear"
      />
    </template>
    <template #time>
      <!-- date presets, custom range, then Refresh last -->
    </template>
    <template #end>
      <FTInput v-model="search" placeholder="Type to filter" preIcon="fas magnifying-glass" />
      <FTButton type="button" iconOnly icon="fas file-export" aria-label="Export the listed rows" />
    </template>
    <template #cover>
      <FTSelectionBar :count="selectedCount" />
    </template>
  </FTListToolbar>
</template>
<template>
  <FTListToolbar :covered="selectedCount > 0" :stacked="twoRows" label="Bonus list controls">
    <template #modes>
      <!-- stacked and covered: every tab has disabled: true -->
      <FTTabs tabStyle="compound" :tabs="modeTabs" @tab-click="onMode" />
    </template>
    <template #start>
      <FTFilterBar
        :filters="filters"
        :pinned="pinned"
        :disabled="selectedCount > 0"
        @update="update"
        @clear="clear"
      />
    </template>
    <template #time>
      <!-- date presets, custom range, then Refresh last -->
    </template>
    <template #end>
      <FTInput v-model="search" placeholder="Type to filter" preIcon="fas magnifying-glass" />
      <FTButton type="button" iconOnly icon="fas file-export" aria-label="Export the listed rows" />
    </template>
    <template #cover>
      <FTSelectionBar :count="selectedCount" />
    </template>
  </FTListToolbar>
</template>

The page must ​

  • Set covered while rows are selected, and pass the selection bar in the cover slot.
  • While covered, set disabled on the FTFilterBar in start, so its open menus close.
  • Stacked and covered, set disabled on every tab in modes: the tabs' own disabled state, never a dim.
  • Keep every time control in time, as one group, with Refresh last.
  • Keep Export and Display beside the search in end, not in the selection bar.

Props ​

PropTypeDefaultDescription
coveredbooleanfalseThe cover slot lies over the start group; the start group is hidden and inert. Without a cover slot nothing changes.
stackedbooleanfalseTwo rows: modes and time on top, filters and end below
labelstring'List controls'Accessible name of the toolbar group

Slots ​

modes, start, time, end, cover: see the table above. An empty slot renders no group.

CSS custom properties ​

PropertyDefault
--ft-list-toolbar-gapvar(--spacing-sm)