AppTopBar

App

Top bar wrapper passed into AppShell's header slot. The logo slot anchors the left side while children (GlobalSearch, UserMenu, Button, etc.) are arranged in a flex row. Named regions start (after the logo) and end (pushed to the far end) take HTML or ordered { id, node, order, hidden } items, for controls other modules contribute.

Arama + actions + kullanıcı

Preview
Search everything…
JD
Code
<%- include('modules/app/AppTopBar', {
  children: `
    <%- include('modules/app/GlobalSearch', { placeholder: 'Search everything…' }) %>
    <button class="p-1.5 rounded-md text-text-secondary hover:bg-surface-overlay">
      <i class="fa-solid fa-bell" aria-hidden="true"></i>
    </button>
    <%- include('modules/domain/common/user/UserMenu', { name: user.name, role: user.role }) %>
  `
}) %>

Logo + action + kullanıcı

Preview
Acme Dashboard
JD
Code
<%- include('modules/app/AppTopBar', {
  logoContent: '<span class="text-sm font-bold text-primary">Acme Dashboard</span>',
  children: `
    <div class="flex-1"></div>
    <%- include('modules/ui/Button', { children: 'New', iconLeft: '<i class="fa-solid fa-plus"></i>' }) %>
    <%- include('modules/domain/common/user/UserMenu', { name: user.name }) %>
  `
}) %>

Regions: start + ordered end items

Preview
Acme
Production
JD
Code
<%# Contributed controls arrive as ordered items; hidden ones are left out. %>
<%- include('modules/app/AppTopBar', {
  logoContent: logoHtml,
  start: environmentBadgeHtml,
  end: [
    { id: 'notifications', order: 10, node: bellHtml },
    { id: 'calls', order: 20, node: presenceHtml, hidden: !telephonyEnabled },
    { id: 'user', order: 100, node: userMenuHtml },
  ]
}) %>
Source modules/app/AppTopBar.ejs