---
title: "Status · Base UI — StyleX Blocks"
description: "A palette-driven presence dot with a label, for system and user state."
url: "https://stylexblocks.com/components/base-ui/status/"
agent:
  instructions: "Use this search API to find relevant components and blocks across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://stylexblocks.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Status

A palette-driven presence dot with a label, for system and user state.

- Behavior engine: Base UI
- Also available for: [Ark UI](https://stylexblocks.com/components/ark-ui/status.md), [UI SDK](https://stylexblocks.com/components/ui-sdk/status.md)
- Category: Feedback
- Sizes: sm, md, lg
- HTML page: https://stylexblocks.com/components/base-ui/status/

## Install

Configure the project once (sets the behavior engine and import aliases):

```sh
npx stylexblocks init --style base-ui
```

Then add the item as source you own:

```sh
npx stylexblocks add status
```

Equivalent: `npx shadcn add @stylexblocks/status`. Registry item JSON: https://stylexblocks.com/r/base-ui/status.json

## Usage

```tsx
import { Status } from "#components/ui/base-ui/status.tsx";
import { greenPalette } from "@stylexblocks/ui/themes/palettes.ts";

export function Example() {
  return (
    // size resolves once on Root (exposed as data-size); the dot takes the
    // active palette's solid color
    <Status.Root size="md" palette={greenPalette}>
      <Status.Indicator />
      Operational
    </Status.Root>
  );
}
```

## Source

`components/ui/base-ui/status.tsx`

```tsx
import * as stylex from "@stylexjs/stylex";
import { createSlotRecipeContext } from "#lib/base-ui/create-slot-recipe-context.tsx";
import { defineSlotRecipe } from "#lib/recipe-props.ts";
import { colorPalette } from '@stylexblocks/ui/color-palette.stylex.ts'
import { fontSizes } from '@stylexblocks/ui/tokens/font-sizes.stylex.ts'
import { lineHeights } from '@stylexblocks/ui/tokens/line-heights.stylex.ts'
import { radii } from '@stylexblocks/ui/tokens/radii.stylex.ts'
import { spacing } from '@stylexblocks/ui/tokens/spacing.stylex.ts'

const statusRoot = stylex.create({
  base: {
    display: 'inline-flex',
    alignItems: 'center',
    gap: spacing._2,
  },
})

const statusRootSizes = stylex.create({
  sm: {
    fontSize: fontSizes.xs,
    lineHeight: lineHeights.xs,
  },
  md: {
    fontSize: fontSizes.sm,
    lineHeight: lineHeights.sm,
  },
  lg: {
    fontSize: fontSizes.md,
    lineHeight: lineHeights.md,
  },
})

const statusIndicator = stylex.create({
  base: {
    width: '0.64em',
    height: '0.64em',
    flexShrink: 0,
    borderRadius: radii.full,
    forcedColorAdjust: 'none',
    backgroundColor: colorPalette.solid,
  },
})

export type StatusSize = keyof typeof statusRootSizes

// defineSlotRecipe validates the shape at compile time: default values must
// exist in the axis maps, and slot keys must be `styles` or a declared axis
const statusSlotRecipe = defineSlotRecipe({
  slots: {
    root: { styles: statusRoot, sizes: statusRootSizes },
    indicator: { styles: statusIndicator },
  },
  defaultVariants: { size: "md" },
});

/**
 * Status — recipe and component colocated in one file. `<Status.Root size>`
 * resolves the recipe once and the indicator inherits it through context;
 * the dot takes its color from the active palette theme. Each part composes
 * via `render`.
 */
const { withProvider, withContext } = createSlotRecipeContext(statusSlotRecipe);

export const Status = {
  // slot names resolve mechanically from the recipe maps above
  Root: withProvider("span", "root", "StatusRoot"),
  Indicator: withContext("span", "indicator", "StatusIndicator"),
};
```
