ObjectStackObjectStack

App

App protocol schemas

Base Navigation Item Schema

Shared properties for all navigation types.

NAMING CONVENTION:

Navigation item IDs are used in URLs and configuration and must be lowercase snake_case.

@example Good IDs

  • 'menu_accounts'

  • 'page_dashboard'

  • 'nav_settings'

@example Bad IDs (will be rejected)

  • 'MenuAccounts' (PascalCase)

  • 'Page Dashboard' (spaces)

Source: packages/spec/src/ui/app.zod.ts

TypeScript Usage

import { AppBranding, AppContextSelector } from '@objectstack/spec/ui';
import type { AppBranding, AppContextSelector } from '@objectstack/spec/ui';

// Validate data
const result = AppBranding.parse(data);

AppBranding

Properties

PropertyTypeRequiredDescription
primaryColorstringoptionalPrimary theme color hex code
logostringoptionalCustom logo URL for this app
faviconstringoptionalCustom favicon URL for this app

AppContextSelector

Properties

PropertyTypeRequiredDescription
idstringSelector id; selected value is exposed as the nav template var {<id>}
labelstringDropdown label
iconstringoptionalIcon name
optionsSourceObjectOption data source
includeAllbooleanPrepend an "All" option that clears the scope
allValuestringTemplate value when "All" is selected (empty = no filter)
persistEnum<'query' | 'session' | 'none'>Persist selection via URL query, sessionStorage, or not at all
placementEnum<'sidebar_header' | 'topbar'>Render location in the app chrome

On this page