For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /api/elements/title-bar-view.md.

<title-bar-view>

Makes part of a custom title bar the handle that drags the window, like the CSS app-region: drag property. It works only in Lynx's desktop apps for Windows and macOS, which use Lynx's Clay renderer: desktop (Clay) only.

Usage

src/app/app.ts
import { Component } from '@angular/core';
import { LYNX_ELEMENTS } from '@blotch/angular-lynx';

@Component({
  selector: 'app-root',
  imports: [LYNX_ELEMENTS],
  template: `
    <view style="display: flex; flex-direction: column; height: 100%;">
      <view
        style="display: flex; flex-direction: row; align-items: center; height: 44px;"
      >
        <title-bar-view
          [moveable]="true"
          style="display: flex; align-items: center; flex: 1; height: 100%;"
        >
          <text>My App</text>
        </title-bar-view>
        <view style="width: 44px; height: 100%;" (bindtap)="close()">
          <text>✕</text>
        </view>
      </view>

      <scroll-view style="flex: 1;" scroll-orientation="vertical">
        <!-- The rest of the window -->
      </scroll-view>
    </view>
  `,
})
export class App {
  close(): void {}
}

Import LYNX_ELEMENTS in your component (see Elements).

Put the title bar across the top of the window, above the page's content. Dragging anywhere on the <title-bar-view> moves the window. Keep buttons, such as close, outside it, next to it in the bar: they stay tappable, and a press on them doesn't start a drag.

:::note iOS, Android and the web have no <title-bar-view>, so AngularLynx creates a <view> in its place there.

  • Its content and layout stay the same, and dragging it does nothing. moveable has no effect.
  • A CSS rule that selects the element by its tag name (title-bar-view { … }) doesn't apply. Style it with a class instead. :::

Attributes

AttributeTypeDefaultDescription
moveablebooleanfalseWhen true, dragging this element moves the window.

Plus the common attributes, such as id, class and style.

Events

None, apart from the common events, such as bindtap.

Platform support

PlatformSupport
Windows and macOS desktop apps (Clay)Yes, Lynx 3.8 and later.
iOS and AndroidNo. It's a <view> there.
WebNo. It's a <view> there.