Page Site Header

サイトのヘッダー:ロゴ、ナビゲーション、アクションに加え、狭い画面ではメニューボタンでナビゲーションを Sheet パネルに開きます。上部に固定できる header にまとめます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 未対応

使い方

インポート

ts
import {
  SonePageSiteHeaderActionsDirective,
  SonePageSiteHeaderComponent,
  SonePageSiteHeaderLogoDirective,
  SonePageSiteHeaderMenuDirective,
  SonePageSiteHeaderNavDirective,
} from "@surface-one/angular/page-site-header";

API リファレンス

SonePageSiteHeaderActionsDirectiveディレクティブ

`[sonePageSiteHeaderActions]` — controls at the end: a theme switch, a sign-in button.

セレクター
[sonePageSiteHeaderActions]

SonePageSiteHeaderComponentコンポーネント

`<sone-page-site-header>` — the header of a site (Nuxt UI Header): the logo or a `title` link, the `[sonePageSiteHeaderNav]` navigation (a `sone-navigation-menu`, a list of links) and `[sonePageSiteHeaderActions]`. Below a medium width (a container query) the navigation gives way to a menu button that opens `[sonePageSiteHeaderMenu]` in a sheet — focus trapped, Escape and the scrim close it, a link in it closes it too; `[(open)]` is that sheet. It renders a `<header>`, the page's banner outside `main`; `sticky` pins it to the top.

セレクター
sone-page-site-header
入力
名前型 デフォルト
title

A text logo, a link to `href` (use `[sonePageSiteHeaderLogo]` for your own).

string | nullnull
hrefstring"/"
open双方向

The narrow-screen menu sheet — `[(open)]`.

booleanfalse
sticky

Pins the header to the top of the scrolling page.

booleanfalse
menuLabel

Names the menu button and the sheet it opens.

—$localize`:Opens a site's navigation menu:Menu`

SonePageSiteHeaderLogoDirectiveディレクティブ

`[sonePageSiteHeaderLogo]` — the logo at the start of the header.

セレクター
[sonePageSiteHeaderLogo]

SonePageSiteHeaderMenuDirectiveディレクティブ

`[sonePageSiteHeaderMenu]` — the narrow-screen menu, shown in a sheet by the menu button.

セレクター
[sonePageSiteHeaderMenu]

SonePageSiteHeaderNavDirectiveディレクティブ

`[sonePageSiteHeaderNav]` — the site navigation, shown once the header is wide enough.

セレクター
[sonePageSiteHeaderNav]