Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    FloatingActionBar

    FloatingActionBar help users perform an action from a list.

    View source code
    • Usage
    • Props

    Usage

    A FloatingActionButton should be used when a user wants to perform an action that applies to multiple items, such as in a Table or a ListBox component.

    {selectedRowIds.length > 0 && (
      <FloatingActionBar
        actions={[
          {
            text: "Archive",
            onClick: handleArchive,
            iconName: "archive",
          },
          {
            text: "Download",
            onClick: handleDownload,
            iconName: "arrow-down-tray",
          },
        ]}
      >
        {`${selectedRowIds.length} selected`}
      </FloatingActionBar>
    )}
    <Table
      data={data}
      columns={columns}
      getRowId={(row: DataRow) => String(row.id)}
      selectedRowIds={selectedRowIds}
      onRowSelectionChange={handleRowSelection}
      onAllRowsSelectionChange={handleAllRowsSelection}
    />
    

    ActionBar

    If you don't require the floating behavior of the FloatingActionButton, you can use the ActionBar component instead. The ActionBar component has the same props as the FloatingActionButton.

    3 selected

  • <ActionBar
      actions={[
        {
          text: "Archive",
          onClick: () => "Archive",
          iconName: "archive",
          tooltipContent: "This is some useful information in a tooltip",
          tooltipPlacement: "top",
        },
        {
          text: "Edit",
          onClick: () => "Edit",
          iconName: "pen",
        },
        {
          text: "Download",
          onClick: () => "Download",
          iconName: "arrow-down-tray",
        },
      ]}
    >
      3 selected
    </ActionBar>
    
    Select an item to see the FloatingActionBar
    Account payableSupplier nameAmount
    401AIRBNBAirbnb2€
    401DELOITTEDeloitte324$
    401MAILCHIMPMailchimp13.29€
    401APPLEApple0€