admin.dashboard or a custom dashboard view, the Admin Panel opens on a dashboard with a card for each collection the user can read. Configuring admin.dashboard adds your widgets and layouts to that dashboard. An explicit admin.components.views.dashboard always takes precedence over the widget configuration.
Defining Widgets
Register widgets throughadmin.dashboard.widgets. Each widget has a unique slug and a Component Path. Optional fields appear in the widget edit drawer.
Dashboard options
admin.dashboard is a DashboardConfig:
Each entry in
widgets is a Widget:
WidgetWidth is 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'full'.
Creating a Widget Component
Widgets are Server Components. Their request exposes the FrogBot instance atreq.frogbot:
Widget component props
Default Layout
defaultLayout accepts an array or a synchronous or asynchronous callback. The callback receives a FrogBotRequest, so it can select a layout using the current user or application data.
WidgetInstance:
Generated Widget Types
Runfrogbot generate:types after registering widget fields. The generated frogbot-types.ts includes an interface for each widget, including its data and allowed widths.
widgetSlug, data, and width in defaultLayout to the corresponding widget definition.
Built-in Widget
The modular dashboard includes acollections widget. When you do not provide defaultLayout, the dashboard starts with this widget. Its component path is @frogbotai/ui/admin/rsc#CollectionCards when you need to reference it explicitly.
User Customization
From the dashboard editor, users can add widgets, edit widget field values, resize, reorder, and remove widgets. Saving stores the layout in the user’s preferences. Canceling discards unsaved edits. A saved preference takes precedence overdefaultLayout. Resetting the layout clears that preference and reapplies the current default layout.