StatusCodeBadge

Domain

Displays an HTTP status code with a semantic color and an optional human-readable label.

All status families

Preview
200OK201Created204No Content301Moved Permanently400Bad Request401Unauthorized403Forbidden404Not Found422Unprocessable Entity429Too Many Requests500Internal Server Error503Service Unavailable
Code
<StatusCodeBadge code={200} />
<StatusCodeBadge code={201} />
<StatusCodeBadge code={204} />
<StatusCodeBadge code={301} />
<StatusCodeBadge code={400} />
<StatusCodeBadge code={404} />
<StatusCodeBadge code={500} />

Without label

Preview
200404500
Code
<StatusCodeBadge code={200} showLabel={false} />
<StatusCodeBadge code={404} showLabel={false} />
<StatusCodeBadge code={500} showLabel={false} />
Sourcemodules/domains/api-doc/StatusCodeBadge.tsx