Skip to content

Coming from PrimeReact

Components 4 does not render PrimeReact or expose Prime types. The public API uses Cratis-owned props, events, tokens, and parts.

PrimeReactComponents
ButtonCommon/Button
DialogDialogs/Dialog
Select / DropdownDropdown
DataTable / ColumnDataTables/DataTableCore / Column
Input fields in command formsCommandForm fields
Tag / Badge / Message / SkeletonDisplay
Toast / ToasterNotifications

Use native HTML for simple application-owned controls that do not need Components behavior. CommandForm fields are specifically for generated command properties; they are not a general local-state input suite.

Components does not provide one-for-one replacements for every Prime widget. Keep an application-owned or direct Prime surface during migration when it requires tabs, sidebars, timelines, knobs, select-button groups, general popovers, grouped/expandable tables, or controlled lazy/server table sorting. Components Toolbar is a canvas/tool-palette control, not a replacement for every page action bar.

The optional MUI, PrimeReact 11, and PrimeReact 10 adapters cover only nine common.* presentation slots: button, icon-button, text-input, text-area, checkbox, radio, switch, progress, and surface. They do not replace Dialog, Dropdown, DatePicker, paginator, table, or another complete widget. Core retains focus, overlay, selection, and keyboard behavior; installing an adapter does not delegate key handling or recreate a Prime public API.

Prime DialogComponents Dialog
headertitle
visiblevisible
onHideonCancel or onClose, according to product meaning
footerbuttons custom content
style={{ width }}width
Prime pass-through slotsDialogParts through pt

A custom buttons footer owns its close result through useDialogContext; Components cannot infer which custom action confirms or cancels.

  • Use DataTableCore for an already-loaded local array.
  • Use DataTableForQuery for a paged Arc query.
  • Use DataTableForObservableQuery for an observable paged Arc query.
  • Use DataPage for a complete list screen with actions and optional details.
  • Keep an application-owned/Prime adapter for grouping, row expansion, or controlled lazy/server sorting until an explicit state contract exists.

For direct Prime migration, rename value to data. Replace compact size, stripes, and column alignment with DataTableParts, Column classes/styles, and product CSS. Prime Column cannot be passed to a Components table or DataPage; import the Cratis marker for those surfaces.

If Components was the application’s only Prime consumer, remove PrimeReactProvider, license keys, presets, renderer defaults, and global Prime pass-through configuration. Mount CratisComponentsProvider for locale, owned labels, and the optional toaster.

If the application still imports Prime directly, keep its installed-version provider, styling, dependencies, and license configuration around those remaining surfaces while mounting CratisComponentsProvider independently for Components. Remove the Prime root only after direct UI imports, icon classes, generated schemas, and any intentional prototype/catalog tooling are accounted for.

A PrimeReact 10 / Components 2 application may migrate directly to Components 4. It does not need to adopt PrimeReact 11 first; keep Prime 10 isolated while replacing surfaces in batches.

  • Map product values to --cratis-* tokens.
  • Replace .p-*, data-scope, and data-part selectors with stable data-cratis-part selectors.
  • Replace Prime pass-through keys with each component’s Cratis-owned pt type.
  • Replace PrimeIcons with React icon nodes or product-owned SVGs.

Components tables render one Arc-provided page. Filtering and sorting the complete dataset belongs on the server before paging. Do not reproduce a client-side DataTable mode over partial data.

Follow the complete Components 3 to 4 migration.