@uibot/blocks-shadcn
Shadcn-based Spec renderers, Catalog definitions and independent React blocks.
Drilldown navigation
Import DrilldownNavigation from @uibot/blocks-shadcn/sidebars.
Pass sections: [{id, label?, items}], where each item has a globally unique
id, label, optional React icon, href, and children (nested sections).
Entering a section replaces the menu by default. Optional onEnter(id, href?)
lets the host navigate to an overview at the same time. showActiveLabel
shows the active leaf on root branches; panelHeader accepts a workspace picker. Back and Escape retain the current
route and restore focus to the section trigger. Leaves are native anchors;
onNavigate(href) intercepts ordinary clicks for a host SPA router while
modified clicks remain native. activeHref highlights the current route.
Omit panelId for local session state, or provide panelId (null for root)
with onPanelChange. Header/footer accept React content. No browser storage,
account access, data requests or authorization are performed.
SidebarDrilldown and the sidebar-drilldown registry item provide a local
navigation demonstration. After source installation, import the named
SidebarDrilldown from sidebars/sidebar-drilldown, or the core
DrilldownNavigation from sidebars/drilldown-navigation. Core styles are
scoped and embedded; the wrapper needs host Tailwind and shadcn theme tokens.
This is original MIT-licensed UIBot code inspired by Claude Console's
interaction, not copied proprietary source. Sidebar01 through Sidebar16
remain separate shadcn-derived React layouts with their original provenance.
Spec and billing template
DrilldownMenu adapts the same component to bounded JSON sections (256 items,
six levels, fixed icon names). Use empty string for the root panelId and
bind onPanelChange with SetState, value: {_event: "value"}. Optional
onNavigate receives the href in event.value and event.values.href. Header
and footer slots, label and backLabel belong to the host. navigateOnEnter
explicitly dispatches a literal Link path from the branch href; Back never navigates.
BILLING_SOLUTION from @uibot/blocks-shadcn/solutions authors
template:console-billing: /spending, /, /cost, /usage, /billing,
and /limits retain their IDs/routes. Dashboard, Messages (request builder,
batches, logs), Agents (lists and creation forms), Resources (files, skills,
webhooks, app integrations), Keys & access (API keys, service accounts, workload identity),
Security & data (data retention), Settings (Profile, Organization, Workspaces,
Capabilities, OpenTelemetry and Claude Code settings) and notifications share ConsolePage and the
PageLayout console appearance. The same native multi-page Spec reaches the public bundle,
Playground, Studio, CLI/MCP and source registry. It reuses PageLayout's wide
sidebar and mobile drawer. All amounts, invoices and limits are fictional
fixtures. Service writes require explicit host callbacks; forms do not fabricate
success. ConsolePage emits onAction intents via event.values (action and fields).
ConsolePage.options accepts bounded string choices for agents, deployments,
environments, vaults, resources, models and skills. Missing choices disable
dependent actions; host owns IDs and authorization. The root exports
AgentsPages, ResourcesPages, SettingsPages and IdentityPages for direct React hosts.
Settings emit create-api-key { name, workspace, expiresIn, account, scope, expiresOn? },
create-service-account { name, description, role, workspaces } (workspaces is JSON),
register-issuer { provider, issuerUrl }, change-privacy-setting { setting, enabled },
delete-metrics-data, and request-development-partner-program intents.
The host owns confirmation and execution. These views never generate, reveal or
persist API secrets. Privacy switches retain the displayed policy until host
confirmation; deleting metrics requires a separate confirmation. Identity setup
stops at the first host registration request, without claiming a configured rule,
service account target or verified authentication. Source layouts and forms were
inspected in authenticated Claude Console on 2026-10-30.
The React Resources view accepts an optional onUploadFile(File) callback;
selecting a file is local and never uploads implicitly. Real billing,
identity, organization, data, permission and payment adapters belong to the host.
The console reference was inspected on 2026-10-29 at platform.claude.com.
UI code is an original implementation; the four Dashboard model illustrations
in src/blocks/console/model-art.ts are Anthropic artwork, retained as reference
assets with attribution and not relicensed as UIBot artwork. Model names and
static copy reflect that reference snapshot, not a live product catalog.
Desktop layouts were observed; mobile is a responsive adaptation.
Settings adds /settings/general, /settings/organization, /settings/workspaces,
/settings/workspaces/new, /settings/capabilities, /settings/telemetry-destinations
and /claude-code/settings. Workspace details use a local drawer, retaining list filters.
PreferencesPages and TelemetryPage are exported for direct React hosts. Profile
photos use only onUploadAvatar(File); telemetry headers and Full content configuration
use only onConfigureTelemetry(config). Neither crosses serialized Spec events.
Without those ports, draft controls remain inspectable and submission is disabled.
The host owns confirmation, security policy, account identity and persistence.
ConsoleAccount provides the source-inspired organization menu, searchable language
dialog, feedback rating dialog and Legal center submenu. PageLayout console accepts
host display props userName, email, subtitle and language, and emits optional
onAction intents (log-out, use-old-navigation, change-language, submit-feedback).
A request does not update the confirmed account state. Dialog dismissal restores focus.
The five supported code languages (JSON, shell, Python, JavaScript and TypeScript)
use an explicit Shiki JavaScript engine and GitHub light/dark themes; code remains text,
never evaluated, and the same exact source is available to existing copy actions.
Plain React Console shell
Import ConsoleShell from @uibot/blocks-shadcn/console. Pass brand, navigation,
workspace, account, search, headerActions, footer and children as React nodes.
Omitted slots are empty; there are no default business links or sample identities.
copy accepts openNavigation/closeNavigation/navigation labels. The shell owns only the
mobile Radix dialog; nested DrilldownNavigation consumes Escape before drawer dismissal,
restoring its branch focus. At the root, Escape/Close restores the drawer trigger. The host's navigation component owns
activeHref/onNavigate and preserves modified clicks. Root exports also expose ConsoleShell;
use the subpath to keep Spec and business modules out of an ordinary React bundle. Apply
the dark class and shadcn tokens on the host document root so portaled dialogs/menus inherit them.
DrilldownWorkspacePicker from /sidebars accepts workspaces with stable id/label,
selectedId, onChange, loading, disabled and optional copy labels. onChange requests selection;
only a host selectedId update confirms it. Legacy label/onCreate/onManage remain supported.
Unconnected management/selection actions are disabled. Unknown IDs show a placeholder.
DialogContent and DialogFooter accept closeLabel (default Close).
The original ConsoleFrame adapts its Spec props and slots to the same shell and foundational
styles. Its business actions/search/account remain in the Spec adapter. The standalone
console-shell registry item ships shell.tsx and shell-styles.ts, explicitly depends on React and radix-ui and does not require
Spec or unpublished UIBot packages. Existing install conflict handling and host ownership apply.
See the isolated Start host for candidate
package preparation, frozen installation and real browser checks. No network/storage/session
logic or service authorization is provided by the shell.
With navigateOnEnter, branch hrefs render as links: ordinary clicks enter and
navigate, closing mobile navigation; modified clicks retain native link behavior.
Branches without that option keep their menu-only button behavior.
Dashboard 01
DASHBOARD_01 is exported from @uibot/blocks-shadcn/solutions. It contains one
native Spec page with four metrics, visitor trends, range selection, a searchable
and sortable document outline, column visibility, pagination and section editing.
The shared sidebar retains icon actions when collapsed. MenuLink uses an explicit
onClick chain for buttons and otherwise preserves href navigation. TrendChart
supports pointer/touch inspection and Left/Right, Home/End and Escape keys;
changing the dataset clears the local inspection position.
Portal, Studio, CLI/MCP and the static registry consume the same generated
template:dashboard-01; do not maintain another YAML copy.
The visual structure and sample dataset are adapted from
shadcn/ui dashboard-01,
under the MIT license. Original paths and SHA-256 hashes are exported in
DASHBOARD_01_SOURCE. The notice is packaged at
dashboard-01.NOTICE; page.state.templateSource retains provenance
and the full license when a Spec is exported. Metrics and visitor data are fixed
fixtures, not queried business analytics.
The host must provide dashboard-sections-db (NowAPI.Collection) with
FindAll, InsertOne, UpdateOne and DeleteOne. It authorizes rows and fields,
enforces versions/idempotency, and reconciles uncertain results before retrying.
Mutation success requires a successful list readback. A failed write or readback
keeps the editor draft visible without a success receipt. Preview adapters are
explicit and session-local; this template creates no real service or storage.
The native adaptation uses an editing drawer rather than inline cells and does
not include drag reordering, report export or additional application pages.
The existing 21-page UiBot Admin is a separate composition and remains unchanged.
Shared controls
DataTable facets, columns and row actions reuse the package's shadcn DropdownMenu;
pagination reuses FormSelectControl. Portals mount inside the owning PageLayout
to retain its theme and direction; selects inside native dialogs remain in the
dialog's top layer. A column may declare action: "edit" to emit
the same onRowAction intent as its row menu. This grants no write permission.
protectSolutionEditors(spec, pageIds?) accepts explicit page IDs and protects
Field and Form.* bound drafts; its default remains Tasks and Users. It adds no
storage or navigation authority. Use TrendChart.variant="plain" inside a Card
to avoid nested surfaces; omitted variants retain the existing chart card.