Skip to content

Components

ErrorState

Could not load project activity

The activity service did not respond.

Component reference

Properties

Use ErrorState

A failed content region with an optional retry and supporting actions.

Example import style
error-state.tsxTSX
"use client";

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

export function Example() {
  return (
    <FloodRoot>
      <ErrorState title="Could not load project activity" layout="inline" />
    </FloodRoot>
  );
}

Design notes

  • Use when content is unavailable because a request failed. Leave still-usable content in place for errors that affect a single action.
  • Share EmptyState layout and density in related regions. The row layout keeps recovery at the trailing edge until it needs to wrap below the message.
  • Provide onRetry only when the host can retry the request. Use retrying to hold the focused button and its dimensions while the request runs. Restore focus to a persistent destination when the result replaces the error. Announce operation changes through the host's one status region.

API reference

PropValuesDefault
titlestringRequired
descriptionReactNode—
iconReactNode—
actionsReactNode—
headingLevel2 | 3 | 4 | 5 | 6—
density"compact" | "comfortable"—
layout"centered" | "inline" | "row"—
onRetry() => void—
retryLabelstring"Try again"
retryingbooleanfalse
Native HTML propsOmit<HTMLAttributes<HTMLDivElement>, "title" | "children">Forwarded
View TypeScript source