Configure sections
admin.components.navSections is an ordered array of component import paths. By default, FrogBot renders only CollectionsSection:
navSections replaces that default array, so include every section you want rendered. Sections appear after configured admin.components.navItems, in array order. Plugin navigation items follow configured items. The bottom rail renders after all sections.
Add Recents by including @frogbotai/ui/admin/rsc#RecentsSection where you want it to appear:
NavSection gives each section a title, collapsible body, and scrolling content. Its collapsed state is saved for the current user under frogbot-nav-section:{id} and restored on reload. Give every section a stable, unique id.
Recents behavior
Recents appears when you addRecentsSection to navSections. FrogBot server-renders up to 30 chats available to the signed-in user, ordered by latest message, then refreshes the list after chat mutations, when the window regains focus, and every 30 seconds.
Chats are grouped under Today, Yesterday, Previous 7 days, Previous 30 days, and Older. Empty groups are hidden. The current chat remains active for its nested admin routes, and View all opens the configured chats collection list.
Collection icons and placement
Setadmin.icon on a collection to a built-in kebab-case icon name or a component import path. Your editor autocompletes every built-in name, including robot, bubble-chat, file, link-square, ai-search, and people.
group: null to list a collection as a top-level link above the sections. Leave group undefined to list it directly under the Collections heading, as FrogBot’s built-in collections are, provide a string or localized value to list it under a named group label, or use false to hide only the navigation link. Both options are listed with the other collection admin settings in Admin Options.
Component icons receive size and className props and are added to the generated import map:
# must be a built-in icon name. An unknown name, such as a typo, stops startup with [frogbot] Unknown admin icon '<name>' followed by the valid names. A component path always names its export after #; write './src/components/ProjectsIcon#default' for a default export. Navigation item and settings icons follow the same rules.
Within CollectionsSection, ungrouped collections come first, in configuration order. Named groups follow in first-seen order, with their collections in configuration order.
When the sidebar is collapsed, section headings and labels are hidden and each item displays its label in a tooltip. Section state and named-group state persist for the current user.
Add a navigation item
admin.components.navItems holds the links above your collections. It is empty by default. Each item requires a label and a full path. Set icon to a built-in kebab-case icon name or a component import path, following the icon rules.
/ by default. Use your own admin route and chats collection slug in that path when either is customized.
Component icons receive size and className props and are added to the generated import map.
Configured items are application-authored links and are not filtered by collection permissions or visibility. Apply any required access behavior in the component or destination.
Navigation item options
EachnavItems entry is a NavItem:
Copy and customize a section
The default sections and their prop types are exported from@frogbotai/ui/admin/rsc. Copy RecentsSection into your application when you need to change its query, heading, or server-rendered content. Keep its server component contract and import the reusable client renderer from the public client entry point:
RecentsSectionClient preserves live refresh, date buckets, active rows, and View all. Its public RecentsSectionClientProps contract requires chatsSlug, collectionPath, and normalized recents. bucketRecents is exported from @frogbotai/ui when only the default grouping is needed.
navSections and admin component slots use FrogBotComponent. This type accepts either an import-map path string or a component definition. Collection, navigation item, and settings icons use AdminIcon, which also accepts built-in names; its IconName member lists them. Both types are exported from frogbot for reusable configuration types.
Chat-wide component slots are grouped under admin.components.chat. Use Chat to replace the canonical conversation surface, or UserMessageActions and AssistantMessageActions to customize only role-specific controls. See Chat persistence.
Register a settings page
Add pages to the Settings card grid with the rootsettings array. Each entry requires a label, a relative path, and a Component. Paths may be nested, such as security/audit, but every normalized path must be unique. Do not include /settings or a leading slash.
icon and access are optional. Set icon to a built-in icon name, such as 'robot', or a component import path, following the icon rules. Without access, FrogBot allows any authenticated user. The access function runs before FrogBot shows the card or renders the page. The page component and component icons are added to the generated import map.
Each Settings page names itself in the browser tab, followed by admin.meta.titleSuffix: Collections - FrogBot on the collection cards and the entry’s label on its page, such as Usage - FrogBot. An unknown path, or an entry the user cannot open, reads Settings - FrogBot. The server title already names the page, so the tab doesn’t change after it loads.
Settings entry options
Eachsettings entry is a SettingsEntry:
Plugins append entries after existing settings so they compose in plugin order:
Customize the bottom rail
Account and Settings appear in the default bottom rail. Add components around them withadmin.components.beforeBottomRail and admin.components.afterBottomRail. Use beforeSidebarClose for controls immediately left of the expanded sidebar close button.
Customize the account menu
Select Account in the bottom rail to open the account menu. Its items appear in this order:- Your name and email, which open the account page
admin.components.beforeAccountMenu- Settings
admin.components.afterAccountMenuadmin.components.settingsMenu- Log out, or
admin.components.logout.Buttonwhen set
req. Use req?.frogbot to reach FrogBot. See Component props for the full list.
Replace the sidebar
Setadmin.components.Nav to replace the default sidebar. Your component receives the standard admin server props, including the current user, permissions, and visible collections.
Nav fully owns navigation rendering. It does not receive FrogBot’s default sidebar styles, configured items or sections, bottom rail, or shell slots automatically.
Use the sidebar outside the admin
The sidebar doesn’t need the admin panel.NavShell, AppSidebar, NavSection, NavItem, AccountMenu and RecentChats are exported from @frogbotai/ui, so a browser extension’s side panel or your own app can show the same sidebar with @frogbotai/ui/styles.css alone.
NavAdapterProvider tells the sidebar how your app links and navigates. Every prop is optional: without it, links are plain anchors, the current path comes from location, navigating sets location, and preferences, such as a collapsed section, live in memory. Define Link outside your component, as any React component: a new Link on each render remounts every link and moves keyboard focus off the one just pressed. Render the sidebar inside a ThemeProvider, like any FrogBot component outside the admin, so it gets FrogBot’s font and light or dark mode.
Below 768px the shell is a drawer with a menu button, a backdrop and Escape to close it; on wider screens it is a rail that collapses to icons, with a label tooltip on hover. Without
accountPath the bottom rail has no account menu.