Skip to content

Frontend

Extending Rebase

Rebase offers roughly a dozen extension mechanisms — plugins, slots, component overrides, entity views, actions, custom fields, and more. Each one targets a different scope (app-wide, per-collection, per-entity, per-property) and a different part of the UI.

This guide helps you pick the right mechanism for your use case, then links to the detailed reference for each.

Everything here is the admin panel. For the server — narrowing a read, adding a route, embedding the driver in your own process, rebase eject — see Rebase doesn’t do X, which is the same kind of table for the backend.

I want to… Mechanism Scope Reference
Replace the app bar components (Shell.AppBar) app Component Overrides
Replace the login page components (Auth.LoginView) app Component Overrides
Replace the home page components (HomePage) app Component Overrides
Change how one table’s form looks entirely formView in customizeTable table below
Swap one component inside one table’s collection components in customizeTable table Component Overrides
Set default component overrides for all collections components (collection-scoped names) app Component Overrides
Add a button to the collection toolbar Actions in customizeTable table Entity Actions
Inject UI at a collection toolbar slot collection.actions slot app/plugin Slots
Add a computed column to a table additionalFields in customizeTable table Additional Columns
Replace one field’s control Field in customizeTable field Custom Fields
Register a reusable field type propertyConfigs app Custom Fields
Add an entity tab entityViews in customizeTable entity Entity Views
Render one table’s rows a different way customViews in customizeTable table below
Add a row/context action or entity button entityActions in customizeTable entity Entity Actions
Put a figure on a collection’s home-page card home.card.widget slot app/plugin Slots
Inject UI at a specific chrome location slots app/plugin Slots
Ship several extensions as one installable unit plugins app Plugins
Style the thing I just built @rebasepro/ui + theme tokens any Styling Custom UI

Scope: app.

A plugin bundles injected or modified collections, views, slot contributions, field wrappers, providers, hooks, and lifecycle callbacks into a single installable unit. Component overrides, entity views, entity actions and propertyConfigs are not plugin fields: they go on <Rebase> or in a table’s customizeTable.

→ Plugins reference

Scope: app (contributed per-slot).

Slots are named UI extension points scattered throughout the CMS chrome. You register a React component targeting a slot name, and it renders at that location. There are 27 slots covering the home page, navigation, collection views, forms, entity rows, form fields and the app bar — and every one of them is rendered.

→ Slots reference

Scope: app-level defaults or per-collection.

Two modes: Eject (full replacement) or Wrap (augment the original).

19 overridable component names in two tiers:

App-only (7):

  • Shell.AppBar
  • Shell.Drawer
  • Shell.DrawerNavigationItem
  • Shell.DrawerNavigationGroup
  • HomePage
  • HomePage.CollectionCard
  • Auth.LoginView

Collection-scoped (12):

  • Collection.View
  • Collection.Table
  • Collection.Card
  • Collection.EmptyState
  • Collection.Actions
  • Collection.FilterField
  • Entity.Form
  • EditView.FormActions
  • DetailView
  • Entity.SidePanel
  • EntityPreview
  • Entity.MissingReference

Precedence: A table’s components apply on top of app-level defaults for the same component name: a collection replacement replaces both, and a collection wrap: true override wraps the app-level one. App-only component names (Shell.*, HomePage, Auth.*) can only be overridden at the <Rebase> level.

→ Component Overrides

Scope: entity (adds tabs).

Custom views that appear as tabs in the entity detail page. Defined per table in customizeTable, or registered once on <Rebase entityViews> (or <RebaseCMS entityViews>) and named by key in a table’s entityViews.

→ Entity Views

Scope: entity.

Custom action buttons on individual entities (publish, archive, clone, etc.). Defined per table in customizeTable, or registered once on <Rebase entityActions> (or <RebaseCMS entityActions>) and named by key in a table’s entityActions.

→ Entity Actions

Scope: collection.

Toolbar-level React components that receive CollectionActionsProps (selected entities, table controller, collection context). Rendered in the collection toolbar alongside built-in actions.

Relationship with collection.actions slot: Both are additive — Actions components render first in the toolbar, then slot contributions from collection.actions. They do not replace each other.

→ Entity Actions — Collection Actions

Scope: collection (adds a view mode).

A map, a calendar, a gallery, a timeline — another rendering of the same rows, offered in the collection’s view switcher beside List, Table, Cards and Board.

// frontend/src/cms/tasks.tsx
import { customizeTable } from "@rebasepro/cms";
import type { tasks } from "../../../backend/schema/tasks";
import { MapView } from "../components/MapView";
export const tasksCms = customizeTable<typeof tasks>("tasks", {
customViews: [
{ key: "map", name: "Map", icon: "Map", Builder: MapView },
],
enabledViews: ["table", "map"],
defaultViewMode: "map",
});

Or register the component once and name it by key:

<RebaseCMS
tableCustomizations={tableCustomizations}
collectionViews={[{ key: "map", name: "Map", icon: "Map", Builder: MapView }]}
/>
import { customizeTable } from "@rebasepro/cms";
import type { tasks } from "../../../backend/schema/tasks";
export const tasksCms = customizeTable<typeof tasks>("tasks", {
customViews: ["map"],
});

Builder receives the live tableController, so the view inherits the collection’s filters, the search box, sorting, pagination, permission checks and the entity side panel — that is the whole reason to declare one instead of building an AppView:

function MapView({ tableController, onRowClick }: CollectionCustomViewParams) {
return <MapCanvas
markers={tableController.rows.map(row => row.location)}
onMarkerClick={i => onRowClick?.(tableController.rows[i])}
/>;
}

The rows are the server’s, the shape useRows returns: dates as ISO strings, a belongsTo as its foreign-key column, and a relation the view loaded nested under its name. A row has an id column only where its table does; its id is beside it, tableController.ids[i] for tableController.rows[i]. highlightedIds are the ids of the rows the view draws as selected, and selectionController speaks ids and rows too:

import type { CollectionCustomViewParams } from "@rebasepro/cms-types";
import { Card, Typography } from "@rebasepro/ui";
function CardsView({ tableController, highlightedIds, onRowClick }: CollectionCustomViewParams) {
return <div className="grid grid-cols-3 gap-4 p-4">
{tableController.rows.map((row, i) => {
const id = tableController.ids[i];
return <Card key={id}
className={highlightedIds?.includes(id) ? "p-4 ring-2 ring-primary" : "p-4"}
onClick={() => onRowClick?.(row)}>
<Typography variant="subtitle2">{String(row.title ?? id)}</Typography>
</Card>;
})}
</div>;
}

Choosing the view updates ?__view=, survives a reload, and persists per user. Declaring one is enough to offer it — enabledViews only needs setting when you want to take built-ins away. With a single entry the switcher is hidden.

This is not a way to build a view spanning several collections. A view mode is another rendering of one collection’s query. If your component ignores tableController and fetches four tables of its own, it wants to be an AppView — the toolbar above it, with its search box and its record count, would be describing a query it does not render.

Scope: collection.

Replaces the entire default entity form with a custom component, set with formView: { Builder, includeActions } in customizeTable; see Replacing the form. includeActions (default true) keeps Save and Discard in the bar.

Use when you need a completely custom layout for one table’s record editing. For smaller tweaks, prefer the Entity.Form override in components instead.

The Builder is rendered inside the record’s form and receives its live formContext: write with formContext.setFieldValue, and the bar’s Save stores the record. Where the record cannot be edited — the read-only detail view, or a user without edit permission — formContext.disabled is true and writes throw. Set includeActions: false if your Builder saves on its own through formContext.submit().

Scope: collection.

Computed columns displayed in the collection table. They don’t correspond to stored columns: they’re calculated at render time.

→ Additional Columns

Scope: property type.

Reusable field types, registered once on <Rebase propertyConfigs> and named by a field’s propertyConfig.

→ Custom Fields

If the thing you want to change is what the server does rather than what the panel shows, this is the wrong page. The server has its own ladder:

I want to… Rung Reference
Narrow which rows a read returns beforeQuery hook Extending the server
Redact a value on the way out afterRead hook Table hooks
Add an endpoint of my own custom function Custom Functions
Make search find substrings and fold accents search.mode: "hybrid" Search
Own the server process custom server, then rebase eject Extending the server

→ Rebase doesn’t do X

  • A table’s components applies over global components inside its collection. A collection replacement replaces both; a collection wrap: true override wraps the global override when there is one. See Component Overrides.
  • Collection Actions and collection.actions slot are additive — Actions render first, then slot contributions.
  • App-level entityActions and entityViews are a registry, not defaults: a table shows one only when its own entityActions / entityViews in customizeTable names its key.
  • Plugins apply in the order of the plugins array, not by key. Slot contributions render by their order (lower first, 50 by default), and ties keep that order. Field wrappers from several plugins compose in that order, the first plugin’s innermost. See Plugins.