Skip to content

Common Components

The Common module provides reusable UI components and the styling setup primitive that serve as building blocks for applications.

  • CratisComponentsProvider: Locale, Components-owned labels, and optional app-wide toaster.
  • TextInput / TextArea: Native text controls with semantic string changes and real element refs.
  • Checkbox / Radio / Switch: Native form choices with semantic boolean changes and browser-owned submission and reset behavior.
  • Button / IconButton: Native actions with semantic variants, tones, loading, and disabled behavior.
  • Surface: A bounded div, section, or article container with no invented interaction state.
  • Icon / IconDisplay: Unified icon type that accepts a CSS class string or any React node.
  • Page: Layout primitive for consistent page structures.
  • FormElement: Lightweight wrapper that places an icon addon to the left of a form input.
  • ErrorBoundary: Error handling for React component trees.