Skip to content

Components

NoResults

No matching projects

Component reference

Properties

Use NoResults

A compact empty result after search or filtering, with optional reset.

Example import style
no-results.tsxTSX
"use client";

import { FloodRoot, NoResults } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <NoResults title="No matching projects" />
    </FloodRoot>
  );
}

Design notes

  • Use after search or filtering excludes every item. Keep the search and filters in place. Use EmptyState for a new collection with no records.
  • Pass onReset only when this region owns the reset action. Name its scope with resetLabel. A clear command in the toolbar can own the whole reset.
  • Pass resetFocusRef to return focus to a persistent input or filter before the results change. Keep announcements in the collection's existing status region.
  • The default compact row puts reset at the trailing edge when it fits. At narrow widths it falls below the message.

API reference

PropValuesDefault
descriptionReactNode—
iconReactNode—
headingLevel2 | 3 | 4 | 5 | 6—
density"compact" | "comfortable""compact"
layout"centered" | "inline" | "row""row"
titlestring"No results"
onReset() => void—
resetLabelstring"Clear filters"
resetFocusRefRefObject<HTMLElement | null>—
Native HTML propsOmit<Omit<HTMLAttributes<HTMLDivElement>, "title" | "children">, "title" | "actions">Forwarded
View TypeScript source