Salta ai contenuti

Slots

Questi contenuti non sono ancora disponibili nella tua lingua.

Slots are named UI extension points where you can inject custom React components. Each slot has typed props specific to its location in the UI. Rebase ships with 29 built-in slots covering the home page, navigation, collection views, entity forms, dashboards, and more.

<Rebase
client={client}
slots={[
{
slot: "navigation.footer",
Component: MyNavigationFooter,
order: 10
},
{
slot: "collection.actions",
Component: BulkExportButton
}
]}
>
const myPlugin: RebasePlugin = {
key: "my-plugin",
slots: [
{
slot: "home.cards",
Component: AnalyticsCard,
order: 20
}
]
};
SlotProps TypeDescription
home.actionsPluginGenericPropsActions in the home page header
home.cardsPluginHomePageAdditionalCardsPropsAdditional cards on the home page
home.children.startPluginGenericPropsContent at the start of the home page
home.children.endPluginGenericPropsContent at the end of the home page
home.card.insightHomeCardInsightSlotPropsCompact insight widget inside a home page collection card
home.collection.actionsPluginHomePageActionsPropsActions on home page collection cards
SlotProps TypeDescription
navigation.headerNavigationSlotPropsBelow the logo in the sidebar drawer
navigation.footerNavigationSlotPropsAbove the collapse toggle at the bottom of the drawer
SlotProps TypeDescription
collection.actionsCollectionActionsPropsEnd-side toolbar actions (after collection Actions)
collection.actions.startCollectionActionsPropsStart-side toolbar actions (alongside filters)
collection.header.actionCollectionHeaderActionPropsColumn header action buttons
collection.add-columnCollectionAddColumnProps”Add column” area in table header
collection.errorCollectionErrorPropsError state display for a collection
collection.toolbarCollectionToolbarPropsExtra widgets inside the collection toolbar row
collection.empty-stateCollectionEmptyStatePropsCustom empty-state when collection has no data
collection.insightsCollectionInsightsSlotPropsInsight widgets above the collection table
collection.filter-panelCollectionFilterPanelPropsCustom filter sidebar alongside the table
SlotProps TypeDescription
form.actionsPluginFormActionPropsActions in the entity form action bar
form.actions.topPluginFormActionPropsActions above the form action bar
form.beforePluginFormActionPropsContent before the form title/field list
form.afterPluginFormActionPropsContent after the form field list
entity.row.actionsEntityRowActionsPropsPer-row actions in entity tables
entity.field.beforeEntityFieldSlotPropsUI injected before an individual form field
entity.field.afterEntityFieldSlotPropsUI injected after an individual form field
SlotProps TypeDescription
dashboard.widgetDashboardWidgetPropsWidgets on the dashboard/home page
SlotProps TypeDescription
global.searchGlobalSearchPropsCross-collection search bar component
shell.toolbarShellToolbarPropsTop-level toolbar actions in the app bar
SlotProps TypeDescription
kanban.setupKanbanSetupPropsKanban board setup UI
kanban.add-columnKanbanAddColumnProps”Add column” in kanban view

All slot prop types are exported from @rebasepro/types and can be imported for type-safe slot components:

import type { CollectionActionsProps, NavigationSlotProps } from "@rebasepro/types";

Each props type provides access to the context relevant to the slot’s location — collection metadata, entity data, navigation state, and more. Refer to the individual type definitions for full property details.