Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Datadog Monitors List Integration Block for React

A synced-monitors list for a post-incident review tool connected to Datadog: a facet rail of checkbox groups with live counts beside nine monitors, each with its query, place and state, and a Retry on the one that could not be read.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A synced-objects list for React with Base UI, written for Aftermark, a fictional post-incident review tool, and its Datadog connection. A compact header names both ("Aftermark reads your Datadog monitors") with the mark pair under it. Under a band rule, a facet rail sits at the start: environment, team and state, each a group of checkboxes with a count worked out from the rows, so picking "prod" shows what the other facets would still leave. Behind the divider at the end are nine monitors, each with its name, its Datadog query in code, where it lives and its state (OK, Warn, Alert or No data) as an icon and a word. One monitor could not be read: its row says so and has a Retry that turns to "Reading again" and back to a result in the same row height. A polite line counts what is shown ("Showing 5 of 9 monitors") and says that filters and retries work here only. On a phone the rail folds into a "Filters (2)" button above the rows. The page's rails and top rule come from the Guides spine, so it lines up with its neighbours in a stack. It's built from Checkbox, Field, Badge, Button, Status and Guides, with your theme's tokens for every colour. Datadog is named in text only: no logo, colour or wordmark ships with the block. The product, the monitors and their queries are example data.

FAQ

Does it read monitors from Datadog?

No. Nothing connects, reads or changes anything: the nine monitors are a typed list at the top of the file, MONITORS, and the filters and the Retry work on that list in the browser. The line above the rows says so from the start, and after a retry it says "Retry queued in this demo, nothing was sent." To use it for real, fill MONITORS from the monitors your server read through Datadog's API with a key that has the monitors_read scope.

How do the filters and their counts work?

Inside one facet any ticked option matches (prod or staging); across facets all of them must (prod and Payments and Alert). The count beside an option is what you would see if you ticked it with the other facets' choices kept, worked out by countOf from the same rows, so it never disagrees with the list. Add a facet by adding an entry to FACETS and the value to each monitor. "Clear filters" resets all three.

Does the page move when a filter hides rows?

No. Every monitor is drawn once more, unseen, in the same grid cell as the visible list, so the cell keeps the height of the full nine whatever is hidden. The count line and the rail don't move either. A filter that matches nothing shows "No monitor matches those filters" in the same space.

What does Retry do?

One monitor has readable: false, standing for a read that Datadog refused. Its Retry turns to "Reading again" for about 900 milliseconds, with a timer that is cleared if the block unmounts, then the row reads "Read again in this demo". It is a stand-in: connect it to your own read. The button stays focusable while it works (it is aria-disabled, not removed), and the result is announced through the polite line above the rows.

Why are the states icons and words, not colours?

A monitor's state must survive a colour-blind reader and a monochrome print, so each is an outline badge with an icon and the word (OK, Warn, Alert, No data), the same four Datadog uses. The only colour is a small dot on the one row that could not be read, because that is the single exception on the page.

How does it fit on a phone and in right-to-left layouts?

Below lg the divider gives way to a rule, and the rail folds into a "Filters" button that shows how many are ticked and opens the same checkboxes above the rows; the rows stack their state under the name. Queries and the counts keep their left-to-right order in a right-to-left layout, while the columns flip. The header fades up once on load; with reduced motion it simply appears.

  • Pro

    A connect flow for a post-incident review tool and Datadog: a three-cell progress strip and three bands to choose the site, paste an API key and an application key with length meters, and print a sample test alert, ending in Finish setup.

  • Pro

    A usage section for a post-incident review tool connected to Datadog: seven day columns, each a tall light bar of alerts received with a short solid bar of the incidents opened inside it, and a closing band of three figures.

  • Pro

    An integration detail section for a post-incident review tool connecting to Datadog: a header with the mark pair and Connect Datadog, a framed list of five application-key scopes with one optional write switch, and a three-step rail that rewrites itself.

  • Pro

    Datadog Grid Integration

    Switch and tick grids

    An integration grid section for a post-incident review tool connecting to Datadog: six embeddable sources as drawn, whole-card checkboxes with a limit of four per review and a counter that follows the choices.

  • Pro

    A linked-members list for a community tool connected to Discord: a search that marks the letters you type, fourteen members six to a page with their level roles and link state, a Retry on the one link that failed, and a pager.

  • Pro

    Categorized FAQ

    Topics and filters

    A topic-tabbed FAQ for a bookkeeping app: a compact header, a band of line tabs with a count on each, and one accordion per topic.