> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# `<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

```typescript title="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](/api/angular-lynx/elements/index.md)).

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>`](/api/elements/view.md) 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

| Attribute  | Type      | Default | Description                                          |
| ---------- | --------- | ------- | ---------------------------------------------------- |
| `moveable` | `boolean` | `false` | When `true`, dragging this element moves the window. |

Plus the [common attributes](/api/elements/view.md#attributes), such as `id`, `class` and `style`.

## Events

None, apart from the [common events](/api/elements/view.md#events), such as `bindtap`.

## Platform support

| Platform                              | Support                    |
| ------------------------------------- | -------------------------- |
| Windows and macOS desktop apps (Clay) | Yes, Lynx 3.8 and later.   |
| iOS and Android                       | No. It's a `<view>` there. |
| Web                                   | No. It's a `<view>` there. |

## Related

- [`<cover-view>`](/api/elements/cover-view.md): the other desktop-only element
- [`<view>`](/api/elements/view.md)
