shadcn.io is not affiliated with official shadcn/ui
Datadog Setup Integration Block for React
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.
Installation
Overview
An integration connect flow for React with Base UI, written for Aftermark, a fictional post-incident review tool, and its Datadog connection. A compact header ("Connect Aftermark to Datadog") has the mark pair at its end; under a band rule a three-cell strip built from the catalog's Steps shows where you are (site, keys, test alert), and three bands follow, each with its title and a sentence at the start and its control at the end. The first picks the Datadog site (US1, US3, US5, EU or AP1) in a segmented control and shows the sign-in address and API host that follow from it. The second takes two keys in password fields: an API key of 32 characters and an application key of 40, each with a length meter, a count ("24 of 32") and one plain problem line if a character is not hexadecimal or there are too many. The third prints the sample event a test alert would send, to the chosen site's API host, in a code box that follows the theme, with a Copy button. A closing band holds Finish setup: it waits for both keys and the test alert and says so. Finishing says "Connected in this demo", clears both keys and shows a quiet Disconnect. A polite line says nothing is stored or sent. 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 Steps, Segment Group, Password Input, Field, Copy Button, Button, Shine Button 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, its flow and the sample event are example data.
FAQ
Does it check the keys against Datadog?
No. Nothing connects, validates or stores anything: the block checks only what it can see, the length (32 for an API key, 40 for an application key, as Datadog makes them) and that every character is hexadecimal. To check them for real, call Datadog's key validation from your own server when the visitor finishes, and never put the keys in the page. Finish setup clears both fields, and the polite line says "Nothing leaves this page."
How does the site picker change the page?
Each entry in SITES carries the address you sign in at and the API host that follows from it (US1 api.datadoghq.com, US3 api.us3.datadoghq.com, US5 api.us5.datadoghq.com, EU api.datadoghq.eu, AP1 api.ap1.datadoghq.com). Choosing one rewrites the two lines under the picker, the progress strip's first cell and the host in the sample request, so the visitor sees the address their data would go to. Add a site by adding an entry.
What does the test alert do?
Nothing is sent. The button is available once both keys look right, and pressing it prints the request Aftermark would make: a POST to your site's /api/v1/events with the DD-API-KEY header and a small event body (a title, some text, alert_type: info and a tag). The key in the header is shown as a placeholder, never as what was typed. The polite line says "Test alert prepared in this demo. Nothing was sent to Datadog." The box is a focusable, scrollable region, so a long line can be read by keyboard.
When can I finish, and what happens?
Finish setup stays unavailable until both keys are complete and the test alert has been prepared, and the line under it says what is missing. Editing a key afterwards takes the test alert back to "Not sent yet", because the request would differ. Finishing says "Connected in this demo", clears both keys and swaps the button for a quiet Disconnect, never a red one, which returns the flow to the start.
How does it behave on each base?
The buttons use onClick, and each field's label points to its input with htmlFor and an id.
The segmented control, the password fields and the strip behave the same on every base.
How does it fit on a phone, in right-to-left layouts and with reduced motion?
Below lg each band stacks its title over its control, the strip's three cells stack and the two keys sit one under the other, with the meter under each field. Hosts, keys and the sample request keep their left-to-right order in a right-to-left layout while the bands flip. The header fades up once on load; the meters ease and the strip updates without motion when reduced motion is on.
Related
- Pro
Datadog Detail Integration
Scopes and stepsAn 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 Monitors List Integration
Grouped and triagedA 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.
- Pro
Datadog Alert Dedupe Stats Integration
Bars and columnsA 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
Discord Setup Integration
Choose and verifyA connect flow for a community tool and Discord: a three-step wizard (authorize, pick a server, map three plans to roles with Selects) beside the server's role ladder with the bot's own role marked, ending in Finish setup.
- Pro
Seat Management Billing
Plan and usageSeats on a team plan: members with a role each (viewers are free), a stepper for the seats you pay for, and the monthly and prorated cost worked out before you save.
- Pro
Form Validation Checklist Features
App screensA sign-up form that checks itself: a card with email, password and confirmation beside six password rules and a strength meter that update as you type, with a submit button that stays disabled until every rule passes.