EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
Field·component·@astryxdesign/core

Field Status

Status message component for form field validation feedback. Messages are announced to screen readers through persistent live regions (assertive for errors, polite otherwise), so conditional mounting is safe.

Open in Playground @astryxdesign/core/FieldStatus

Showcases and examples

2 documented examples

Field Status

Field status messages in error, warning, and success states with attached and detached variants.

Preview loads on approachPreview loads on approach
Exact source · field-status-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {FieldStatus} from '@astryxdesign/core/FieldStatus';
import {VStack} from '@astryxdesign/core/Layout';

export default function FieldStatusShowcase() {
  return (
    <VStack gap={4}>
      <FieldStatus
        type="error"
        message="This field is required"
        variant="detached"
      />
      <FieldStatus
        type="warning"
        message="This username is already taken by another team"
        variant="detached"
      />
      <FieldStatus
        type="success"
        message="Your changes have been saved"
        variant="detached"
      />
    </VStack>
  );
}

Usage

FieldStatus renders validation feedback for fields and field-like controls. Use it directly for custom controls that need the same error, warning, or success presentation as Field.

  • Use attached status below bordered inputs when the message belongs to that input.
  • Use detached status for controls like checkboxes, switches, and custom controls where overlap would be visually awkward.
  • Use FieldStatus for general alerts or page-level notices; use Banner or Toast instead.

Typed props

PropType and behavior
type'error' | 'warning' | 'success' · required
Status type.
messagestring · required
Status message text.
idstring
ID for aria-describedby association.
variant'attached' | 'detached' · default 'attached'
Visual variant: attached overlaps the input, detached floats below.

Anatomy

Message box · required

Painted container for the validation feedback.

Detached icon · optional

Leading status glyph shown only by the detached variant.

Message text · required

Text describing the validation status.

Theming

Targets

astryx-field-status

Visual props: type, variant

astryx-field-status-icon

Visual props: type