[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D2D5W6GG9VYB23P19Y6D0D":3,"skill-same:01M6D2D5W6GG9VYB23P19Y6D0D":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":49,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6D2D5W6GG9VYB23P19Y6D0D","ui-part-header",null,"The header (top bar), sticky by default: what goes left, centre and right on a personal site, a product site, docs, a shop, a local business and an app, heights, the name, links and one action, the sticky rules (a solid background, a hairline once scrolled, scroll-padding-top, nothing that stops it sticking), transparent over a hero, hiding on scroll only when asked, announcement bars, the phone header with its Menu button, search and account placement, the skip link, stacking with drawers and dialogs, and the preview check. Read before building or reworking one.","enowdev\u002Fenowxcli","enowdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179420349?v=4","01M6D1MVX2KC0X3Z9NESE7P22K","Enow Dev.","01M6D1MW1FMZGBDKWAJY4GQX81",67,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-part-header\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"ui part header","ui","before building","scroll","local","preview","phone","default","only","business","read","solid","check","Rules","site","personal site","search","product","announcement","docs","2026-11-10 10:12:30",false,"---\nname: ui-part-header\ndescription: \"The header (top bar), sticky by default: what goes left, centre and right on a personal site, a product site, docs, a shop, a local business and an app, heights, the name, links and one action, the sticky rules (a solid background, a hairline once scrolled, scroll-padding-top, nothing that stops it sticking), transparent over a hero, hiding on scroll only when asked, announcement bars, the phone header with its Menu button, search and account placement, the skip link, stacking with drawers and dialogs, and the preview check. Read before building or reworking one.\"\n---\n\n# Header (top bar)\n\nThe generated header: a glass bar with a glow, seven links to pages that\ndo not exist, \"Log in\" beside a gradient \"Get started\" pill, a \"Beta\"\nbadge beside a name with a coloured full stop, and a bar that scrolls away\non a long page, or sticks with nothing behind it so text runs over text.\nThis is the bar that says whose site it is and keeps the few places people\nneed one reach away, on every screen. One part of an interface: the\nprinciples (direction, spacing, type, colour, icons, states,\naccessibility) are in the `ui` skill, the measures in `ui-layout`, the\nlinks inside it in `ui-part-navigation`.\n\n## 1. What it holds, by kind of site\n\nUse it for saying whose site or product this is, and reaching the three or\nfour places people go most. Not for everything the site has: the rest goes\nin the footer (`ui-part-footer`). It is read on every screen, so it is the\nquietest thing on the page that still does that job.\n\n| Kind | Left | Centre | Right | Height |\n|---|---|---|---|---|\n| Personal site | the name | nothing | three links and the contact link, on one baseline | 56 to 64px |\n| Product or marketing site | the name or logo | three to five links | \"Sign in\" as a text link, the one action | 64 to 72px |\n| Docs | the name to the docs home, the sections | search, drawn as a field with its shortcut | version (only with versions), theme, repository | 56 to 64px |\n| Shop | the logo | the search field, 320 to 560px | Account, Cart with its count | 64 to 72px |\n| Local business | the name | nothing, or two links | Call, and the booking action | 56 to 64px |\n| App without a sidebar | product or workspace switcher | search, or the command palette's trigger | help, notifications, the account menu | 56 to 64px |\n| Checkout, sign-up, onboarding | the logo | nothing | one way back (\"Back to cart\") or out (\"Save and exit\") | 56px |\n\nAn app with a sidebar has no site header: under 1024px a 56px top bar holds\na labelled Menu button, the screen's title and its primary action\n(`ui-layout` section 5, `ui-part-sidebar`); the screen's own title and\nactions are its page header (`ui-part-page-header`).\n\n## 2. The name, the links, the action\n\n- The name as it is written, linking home: the text face at 16 to 18px,\n  weight 600, or the real logo when there is one (an SVG 24 to 32px tall,\n  its `alt` the name, not \"logo\"). No full stop, underscore, bracket or\n  blinking cursor after it, and no generated monogram.\n- Three or four links at most, named with the nouns the page uses\n  (\"Projects\", \"Writing\", \"Contact\"), at body size in the text colour, 24\n  to 32px apart. The current one is marked by weight or an underline with\n  `aria-current`, not by a pill. Dropdowns: `ui-part-navigation` section 3.\n- One action only when the product has one (Book, Download, Sign in), as a\n  real button at the default size (`ui-part-buttons`). A link to a profile\n  (GitHub, LinkedIn) is a text link, or an icon with a label, not an\n  outlined button beside the navigation.\n- A theme toggle only when both themes are built and checked: one icon\n  button (sun or moon), no visible text, whose `aria-label` says what it\n  switches to (`ui-themes`).\n- The name's left edge and the last link's right edge line up with the\n  content's container, so the header and the page share one grid: the\n  bar's inner row is the page's container, its background full width.\n- For a personal site the whole header can be one line of text on one\n  baseline: the name, the links, the contact link, with no boxes at all.\n- Links follow the name, or sit at the right before the action; centred\n  only on a product site with three to five (`grid-template-columns: 1fr\n  auto 1fr` keeps them on the page's centre line).\n\n## 3. Sticky, by default\n\n- 56 to 72px tall on wide screens, 56px on a phone. A solid background,\n  from the surface token: content scrolls under it, and a transparent bar\n  lays text over text. A border or a shadow only once the page has scrolled\n  under it: a 1px hairline in the line colour, fading in over 160ms.\n- Sticky by default, on a phone too: `position: sticky; top: 0`, with a\n  `z-index` above the content and below menus and dialogs (section 8), so\n  the navigation and the primary action are always one reach away.\n  `sticky`, not `fixed`: it keeps its place in the flow, so nothing needs a\n  padding-top to clear it.\n- `scroll-padding-top` on `html`, its height plus 8px, so a link to a\n  section does not land under the bar and a control reached by Tab is not\n  hidden behind it (WCAG 2.4.11). Docs with large headings use 16px.\n- Nothing around it has `overflow` other than `visible` or `clip`: a\n  wrapper with `overflow: hidden`, or `overflow-x: hidden` on both `html`\n  and `body`, silently stops it sticking. Fix a horizontal overflow at its\n  cause instead.\n- Its parent runs the page's full height: a sticky element sticks only\n  inside its parent, so a header wrapped in a `div` of its own height\n  scrolls away. Put it directly in `body`, or in the layout's root.\n- Only the bar with the navigation sticks: an announcement strip above it\n  scrolls away, and a header taller than 72px shrinks to its bar once the\n  page scrolls (a negative `top` the height of the part above the bar).\n- The phone menu opens under the bar and scrolls inside itself:\n  `max-height: calc(100dvh - \u003Cbar height>)`.\n- `transform`, `filter` or `backdrop-filter` on the header traps anything\n  `position: fixed` inside it: a menu panel in a blurred bar is cut to the\n  bar. Open the panel as a `dialog` with `showModal()`, or outside it.\n- Not sticky: a page that fits one screen (sign-in, a short form), and an\n  app shell whose content area scrolls on its own, where the bar stays put\n  by the layout.\n\n## 4. Over a hero, and hiding on scroll\n\n- Transparent over the hero only when the hero is a full-bleed photograph\n  that is itself the content (a place, a room), and only at the very top:\n  the bar turns solid, with its hairline, the moment the page scrolls (the\n  same observer), before anything passes under it. The hero pulls up under\n  the bar (`margin-block-start: calc(-1 * var(--header-h))`). Its words\n  keep 4.5:1 against the lightest part of the photograph, on a scrim at the\n  image's top; `preview` measures text against the nearest background\n  colour, not a photograph, so check that yourself.\n- Hiding on scroll down only when the brief asks for it, for a reading page\n  on a phone; never on a desktop app bar, nor when the bar holds the page's\n  action. Hide with `transform: translateY(-100%)` after 8 to 10px down;\n  show on any upward scroll, at the top, while focus is inside\n  (`:focus-within`) and while its menu is open; no transition under reduced\n  motion. `preview` reports it as scrolling away: say the brief asked for it.\n\n## 5. Announcement bars\n\n- One line of real news and one link (\"Version 3 is out: what changed\")\n  above the header, scrolling away with the page: 36 to 40px tall, 44px on\n  phones so its close button is a full target, wrapping rather than cut.\n- One at a time: never an announcement, a cookie notice and a promotion\n  stacked over the header. A state of the page or the account (offline, a\n  failed payment) is a banner below the header (`ui-part-notifications`).\n- Dismissible (\"Dismiss announcement\"), the dismissal kept per announcement\n  id (`localStorage`, or the account) and applied before the first paint\n  (an inline script in `head`, or a cookie the server reads), so it does\n  not flash in and push the page down on every visit. No countdown.\n\n## 6. On a phone\n\n- 56px, sticky, the same solid surface. At the left the name (the logomark\n  alone only when the product has one, its `alt` the name); at the right\n  the one action, shortened (\"Book\", \"Start trial\"), then the Menu button.\n- On a phone the links collapse into a button labelled \"Menu\", not an\n  unlabelled icon: the icon and the word, `aria-expanded`, a 44px target;\n  the panel keeps focus inside, closes on Escape and after a link is\n  chosen, and locks the page behind it (`ui-part-navigation` section 4,\n  `ui-part-drawers`). The links fold where they no longer fit on one line\n  (look at 768px); above that, no hamburger.\n- Search becomes a named icon button opening a full-screen search; the\n  account menu moves into the panel. Side padding 16 to 20px, plus\n  `env(safe-area-inset-left)` and `-right` in landscape.\n\n## 7. Search and account\n\n- Search in the bar only when it is a main way in (docs, a shop, a large\n  blog) and searches something real: a field-shaped button showing `⌘K` or\n  `Ctrl K` on docs, a real field on a shop (`ui-part-search`). A site of\n  ten pages needs none.\n- Signed out: \"Sign in\" as a text link; one filled button only when signing\n  up is the page's goal. Signed in: the avatar or name as a menu button at\n  the far end, named \"Account menu\", with Sign out last\n  (`ui-part-navigation` section 7, `ui-part-menus`); on the marketing site,\n  \"Open app\" where \"Sign in\" was. Counts go in names: \"Notifications, 3\n  unread\", \"Cart, 2 items\".\n\n## 8. Keyboard, screen readers, stacking\n\n- A \"Skip to content\" link as the first thing a keyboard reaches, shown on\n  focus, pointing at `\u003Cmain id=\"main\" tabindex=\"-1\">` (`ui-part-links`).\n- `\u003Cheader>` directly in `body`, so it is the banner landmark; `\u003Cnav\n  aria-label=\"Main\">` around the links; the name is a link, not the `h1`.\n- The current page marked with `aria-current=\"page\"` and more than colour\n  (weight or an underline). Tab order follows the visual order: skip link,\n  name, links, search, action, account menu.\n- One stacking order as tokens, so a dialog never opens under the bar:\n  `--z-to-top: 20` (back to top), `--z-header: 30`, `--z-drawer: 40`\n  (drawers, the phone menu), `--z-dialog: 50`, `--z-toast: 60`. A `dialog`\n  opened with `showModal()` and a `popover` sit in the top layer above all\n  of them with no z-index; a dropdown inside the header rises with it.\n\n## 9. Themes and motion\n\nThe bar is the surface token in both themes, its hairline the line token;\nthe logo is inline SVG in `currentColor`, or one file per theme\n(`ui-themes`). The hairline fades over 160ms; the height never animates; no\nblur; the phone panel moves as in `ui-part-navigation` section 8.\n\n## 10. A sketch\n\n```css\n\u002F* Markup: skip link, header.site-header > .bar (name, nav, action), main#main *\u002F\n:root { --header-h: 64px; }\n@media (max-width: 767px) { :root { --header-h: 56px; } }\nhtml { scroll-padding-top: calc(var(--header-h) + 8px); }\n.site-header {\n  position: sticky; top: 0; z-index: var(--z-header);\n  background: var(--surface);\n  border-block-end: 1px solid transparent;\n  transition: border-color 160ms ease-out;\n}\n.site-header[data-scrolled] { border-block-end-color: var(--line); }\n.bar {\n  display: flex; align-items: center; gap: 24px; min-block-size: var(--header-h);\n  max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 5vw, 48px);\n}\n.bar nav { margin-inline-start: auto; }\n```\n\n```js\n\u002F\u002F The hairline once the page has scrolled: a 1px marker at the top of the page.\nconst header = document.querySelector(\".site-header\");\nconst marker = document.createElement(\"div\");\nmarker.style.cssText = \"position:absolute;top:0;width:1px;height:1px;pointer-events:none\";\ndocument.body.prepend(marker);\nnew IntersectionObserver(([entry]) => {\n  header.toggleAttribute(\"data-scrolled\", !entry.isIntersecting);\n}).observe(marker);\n```\n\n## Check it\n\n- `preview` at 360, 768 and 1440px: on a page longer than a screen and a\n  half it scrolls halfway down, finds the first `header`, `[role=banner]`\n  or `nav` at the top, and when that has left the screen reports \"the top\n  bar scrolls away on a page N screens long: make it sticky\n  (ui-part-header)\". It scrolls rather than reading the CSS, so a wrapper's\n  `overflow` that stops the sticking is caught.\n- In the same report: \"controls without a name\" (an icon-only Menu),\n  \"touch targets under 44px\", \"links to nowhere\"; in the 768px screenshot,\n  links wrapping onto a second line.\n- Follow every in-page link: its heading lands below the bar. Tab from the\n  address bar: the skip link first, then the name and links in order.\n- Open the phone menu, a dialog and a drawer: each covers the bar. Dismiss\n  the announcement and reload: it stays gone, with no flash.\n- When it will not stick, search the global styles and the layout's\n  wrappers for `overflow` (`overflow-hidden` in Tailwind).\n\n## Avoid\n\nA glass header with a glow, seven links to pages that do not exist, \"Log\nin\" beside a gradient \"Get started\" pill, a \"Beta\" badge next to the logo;\na name with a coloured full stop or a cursor; a GitHub button with its icon\nin a bordered box; a search shortcut that searches nothing; a bar that\nscrolls away on a long page, one that sticks with a transparent background,\nsection links that land under it; a hamburger on a wide screen where the\nlinks fit, or an icon with no word on a phone; announcement, cookie and\npromotion bars stacked over it; a bar that hides on scroll without being\nasked, or on a desktop app; a menu panel cut off inside a blurred bar;\n`z-index: 9999`.\n","# Header (top bar)\n\nThe generated header: a glass bar with a glow, seven links to pages that\ndo not exist, \"Log in\" beside a gradient \"Get started\" pill, a \"Beta\"\nbadge beside a name with a coloured full stop, and a bar that scrolls away\non a long page, or sticks with nothing behind it so text runs over text.\nThis is the bar that says whose site it is and keeps the few places people\nneed one reach away, on every screen. One part of an interface: the\nprinciples (direction, spacing, type, colour, icons, states,\naccessibility) are in the `ui` skill, the measures in `ui-layout`, the\nlinks inside it in `ui-part-navigation`.\n\n## 1. What it holds, by kind of site\n\nUse it for saying whose site or product this is, and reaching the three or\nfour places people go most. Not for everything the site has: the rest goes\nin the footer (`ui-part-footer`). It is read on every screen, so it is the\nquietest thing on the page that still does that job.\n\n| Kind | Left | Centre | Right | Height |\n|---|---|---|---|---|\n| Personal site | the name | nothing | three links and the contact link, on one baseline | 56 to 64px |\n| Product or marketing site | the name or logo | three to five links | \"Sign in\" as a text link, the one action | 64 to 72px |\n| Docs | the name to the docs home, the sections | search, drawn as a field with its shortcut | version (only with versions), theme, repository | 56 to 64px |\n| Shop | the logo | the search field, 320 to 560px | Account, Cart with its count | 64 to 72px |\n| Local business | the name | nothing, or two links | Call, and the booking action | 56 to 64px |\n| App without a sidebar | product or workspace switcher | search, or the command palette's trigger | help, notifications, the account menu | 56 to 64px |\n| Checkout, sign-up, onboarding | the logo | nothing | one way back (\"Back to cart\") or out (\"Save and exit\") | 56px |\n\nAn app with a sidebar has no site header: under 1024px a 56px top bar holds\na labelled Menu button, the screen's title and its primary action\n(`ui-layout` section 5, `ui-part-sidebar`); the screen's own title and\nactions are its page header (`ui-part-page-header`).\n\n## 2. The name, the links, the action\n\n- The name as it is written, linking home: the text face at 16 to 18px,\n  weight 600, or the real logo when there is one (an SVG 24 to 32px tall,\n  its `alt` the name, not \"logo\"). No full stop, underscore, bracket or\n  blinking cursor after it, and no generated monogram.\n- Three or four links at most, named with the nouns the page uses\n  (\"Projects\", \"Writing\", \"Contact\"), at body size in the text colour, 24\n  to 32px apart. The current one is marked by weight or an underline with\n  `aria-current`, not by a pill. Dropdowns: `ui-part-navigation` section 3.\n- One action only when the product has one (Book, Download, Sign in), as a\n  real button at the default size (`ui-part-buttons`). A link to a profile\n  (GitHub, LinkedIn) is a text link, or an icon with a label, not an\n  outlined button beside the navigation.\n- A theme toggle only when both themes are built and checked: one icon\n  button (sun or moon), no visible text, whose `aria-label` says what it\n  switches to (`ui-themes`).\n- The name's left edge and the last link's right edge line up with the\n  content's container, so the header and the page share one grid: the\n  bar's inner row is the page's container, its background full width.\n- For a personal site the whole header can be one line of text on one\n  baseline: the name, the links, the contact link, with no boxes at all.\n- Links follow the name, or sit at the right before the action; centred\n  only on a product site with three to five (`grid-template-columns: 1fr\n  auto 1fr` keeps them on the page's centre line).\n\n## 3. Sticky, by default\n\n- 56 to 72px tall on wide screens, 56px on a phone. A solid background,\n  from the surface token: content scrolls under it, and a transparent bar\n  lays text over text. A border or a shadow only once the page has scrolled\n  under it: a 1px hairline in the line colour, fading in over 160ms.\n- Sticky by default, on a phone too: `position: sticky; top: 0`, with a\n  `z-index` above the content and below menus and dialogs (section 8), so\n  the navigation and the primary action are always one reach away.\n  `sticky`, not `fixed`: it keeps its place in the flow, so nothing needs a\n  padding-top to clear it.\n- `scroll-padding-top` on `html`, its height plus 8px, so a link to a\n  section does not land under the bar and a control reached by Tab is not\n  hidden behind it (WCAG 2.4.11). Docs with large headings use 16px.\n- Nothing around it has `overflow` other than `visible` or `clip`: a\n  wrapper with `overflow: hidden`, or `overflow-x: hidden` on both `html`\n  and `body`, silently stops it sticking. Fix a horizontal overflow at its\n  cause instead.\n- Its parent runs the page's full height: a sticky element sticks only\n  inside its parent, so a header wrapped in a `div` of its own height\n  scrolls away. Put it directly in `body`, or in the layout's root.\n- Only the bar with the navigation sticks: an announcement strip above it\n  scrolls away, and a header taller than 72px shrinks to its bar once the\n  page scrolls (a negative `top` the height of the part above the bar).\n- The phone menu opens under the bar and scrolls inside itself:\n  `max-height: calc(100dvh - \u003Cbar height>)`.\n- `transform`, `filter` or `backdrop-filter` on the header traps anything\n  `position: fixed` inside it: a menu panel in a blurred bar is cut to the\n  bar. Open the panel as a `dialog` with `showModal()`, or outside it.\n- Not sticky: a page that fits one screen (sign-in, a short form), and an\n  app shell whose content area scrolls on its own, where the bar stays put\n  by the layout.\n\n## 4. Over a hero, and hiding on scroll\n\n- Transparent over the hero only when the hero is a full-bleed photograph\n  that is itself the content (a place, a room), and only at the very top:\n  the bar turns solid, with its hairline, the moment the page scrolls (the\n  same observer), before anything passes under it. The hero pulls up under\n  the bar (`margin-block-start: calc(-1 * var(--header-h))`). Its words\n  keep 4.5:1 against the lightest part of the photograph, on a scrim at the\n  image's top; `preview` measures text against the nearest background\n  colour, not a photograph, so check that yourself.\n- Hiding on scroll down only when the brief asks for it, for a reading page\n  on a phone; never on a desktop app bar, nor when the bar holds the page's\n  action. Hide with `transform: translateY(-100%)` after 8 to 10px down;\n  show on any upward scroll, at the top, while focus is inside\n  (`:focus-within`) and while its menu is open; no transition under reduced\n  motion. `preview` reports it as scrolling away: say the brief asked for it.\n\n## 5. Announcement bars\n\n- One line of real news and one link (\"Version 3 is out: what changed\")\n  above the header, scrolling away with the page: 36 to 40px tall, 44px on\n  phones so its close button is a full target, wrapping rather than cut.\n- One at a time: never an announcement, a cookie notice and a promotion\n  stacked over the header. A state of the page or the account (offline, a\n  failed payment) is a banner below the header (`ui-part-notifications`).\n- Dismissible (\"Dismiss announcement\"), the dismissal kept per announcement\n  id (`localStorage`, or the account) and applied before the first paint\n  (an inline script in `head`, or a cookie the server reads), so it does\n  not flash in and push the page down on every visit. No countdown.\n\n## 6. On a phone\n\n- 56px, sticky, the same solid surface. At the left the name (the logomark\n  alone only when the product has one, its `alt` the name); at the right\n  the one action, shortened (\"Book\", \"Start trial\"), then the Menu button.\n- On a phone the links collapse into a button labelled \"Menu\", not an\n  unlabelled icon: the icon and the word, `aria-expanded`, a 44px target;\n  the panel keeps focus inside, closes on Escape and after a link is\n  chosen, and locks the page behind it (`ui-part-navigation` section 4,\n  `ui-part-drawers`). The links fold where they no longer fit on one line\n  (look at 768px); above that, no hamburger.\n- Search becomes a named icon button opening a full-screen search; the\n  account menu moves into the panel. Side padding 16 to 20px, plus\n  `env(safe-area-inset-left)` and `-right` in landscape.\n\n## 7. Search and account\n\n- Search in the bar only when it is a main way in (docs, a shop, a large\n  blog) and searches something real: a field-shaped button showing `⌘K` or\n  `Ctrl K` on docs, a real field on a shop (`ui-part-search`). A site of\n  ten pages needs none.\n- Signed out: \"Sign in\" as a text link; one filled button only when signing\n  up is the page's goal. Signed in: the avatar or name as a menu button at\n  the far end, named \"Account menu\", with Sign out last\n  (`ui-part-navigation` section 7, `ui-part-menus`); on the marketing site,\n  \"Open app\" where \"Sign in\" was. Counts go in names: \"Notifications, 3\n  unread\", \"Cart, 2 items\".\n\n## 8. Keyboard, screen readers, stacking\n\n- A \"Skip to content\" link as the first thing a keyboard reaches, shown on\n  focus, pointing at `\u003Cmain id=\"main\" tabindex=\"-1\">` (`ui-part-links`).\n- `\u003Cheader>` directly in `body`, so it is the banner landmark; `\u003Cnav\n  aria-label=\"Main\">` around the links; the name is a link, not the `h1`.\n- The current page marked with `aria-current=\"page\"` and more than colour\n  (weight or an underline). Tab order follows the visual order: skip link,\n  name, links, search, action, account menu.\n- One stacking order as tokens, so a dialog never opens under the bar:\n  `--z-to-top: 20` (back to top), `--z-header: 30`, `--z-drawer: 40`\n  (drawers, the phone menu), `--z-dialog: 50`, `--z-toast: 60`. A `dialog`\n  opened with `showModal()` and a `popover` sit in the top layer above all\n  of them with no z-index; a dropdown inside the header rises with it.\n\n## 9. Themes and motion\n\nThe bar is the surface token in both themes, its hairline the line token;\nthe logo is inline SVG in `currentColor`, or one file per theme\n(`ui-themes`). The hairline fades over 160ms; the height never animates; no\nblur; the phone panel moves as in `ui-part-navigation` section 8.\n\n## 10. A sketch\n\n```css\n\u002F* Markup: skip link, header.site-header > .bar (name, nav, action), main#main *\u002F\n:root { --header-h: 64px; }\n@media (max-width: 767px) { :root { --header-h: 56px; } }\nhtml { scroll-padding-top: calc(var(--header-h) + 8px); }\n.site-header {\n  position: sticky; top: 0; z-index: var(--z-header);\n  background: var(--surface);\n  border-block-end: 1px solid transparent;\n  transition: border-color 160ms ease-out;\n}\n.site-header[data-scrolled] { border-block-end-color: var(--line); }\n.bar {\n  display: flex; align-items: center; gap: 24px; min-block-size: var(--header-h);\n  max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 5vw, 48px);\n}\n.bar nav { margin-inline-start: auto; }\n```\n\n```js\n\u002F\u002F The hairline once the page has scrolled: a 1px marker at the top of the page.\nconst header = document.querySelector(\".site-header\");\nconst marker = document.createElement(\"div\");\nmarker.style.cssText = \"position:absolute;top:0;width:1px;height:1px;pointer-events:none\";\ndocument.body.prepend(marker);\nnew IntersectionObserver(([entry]) => {\n  header.toggleAttribute(\"data-scrolled\", !entry.isIntersecting);\n}).observe(marker);\n```\n\n## Check it\n\n- `preview` at 360, 768 and 1440px: on a page longer than a screen and a\n  half it scrolls halfway down, finds the first `header`, `[role=banner]`\n  or `nav` at the top, and when that has left the screen reports \"the top\n  bar scrolls away on a page N screens long: make it sticky\n  (ui-part-header)\". It scrolls rather than reading the CSS, so a wrapper's\n  `overflow` that stops the sticking is caught.\n- In the same report: \"controls without a name\" (an icon-only Menu),\n  \"touch targets under 44px\", \"links to nowhere\"; in the 768px screenshot,\n  links wrapping onto a second line.\n- Follow every in-page link: its heading lands below the bar. Tab from the\n  address bar: the skip link first, then the name and links in order.\n- Open the phone menu, a dialog and a drawer: each covers the bar. Dismiss\n  the announcement and reload: it stays gone, with no flash.\n- When it will not stick, search the global styles and the layout's\n  wrappers for `overflow` (`overflow-hidden` in Tailwind).\n\n## Avoid\n\nA glass header with a glow, seven links to pages that do not exist, \"Log\nin\" beside a gradient \"Get started\" pill, a \"Beta\" badge next to the logo;\na name with a coloured full stop or a cursor; a GitHub button with its icon\nin a bordered box; a search shortcut that searches nothing; a bar that\nscrolls away on a long page, one that sticks with a transparent background,\nsection links that land under it; a hamburger on a wide screen where the\nlinks fit, or an icon with no word on a phone; announcement, cookie and\npromotion bars stacked over it; a bar that hides on scroll without being\nasked, or on a desktop app; a menu panel cut off inside a blurred bar;\n`z-index: 9999`.\n",{"name":5,"description":7},"main","38293fe1b096e6bf3646c7344c38786ed688f464","crates\u002Fenowx-core\u002Fskills\u002Fui-part-header",21,"https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli","https:\u002F\u002Fenowx.ai","https:\u002F\u002Fgithub.com\u002Fenowdev","Pretending to be a Developer","2026-10-06 02:05:35",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add enowdev\u002Fenowxcli --skill ui-part-header",{"tool":59,"command":60},"bunx","bunx skills add enowdev\u002Fenowxcli --skill ui-part-header",{"tool":62,"command":63},"pnpm","pnpm dlx skills add enowdev\u002Fenowxcli --skill ui-part-header","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-part-header\u002FSKILL.md",true,[],[68,79,96,107,128,147],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6D2HQYSQD9N7MTNDT4A7CBM","demo-skill","Project-scope demo skill for tests.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fworkspace\u002F.agents\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[75,76,77,78,29],"demo skill","demo","tests","project",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":39},"01M6D2HM0GCPM0TM2HPG9HHR2R","writing","Writing words people read: the specific thing instead of claims, words to drop, sentences, interface copy (buttons, labels, errors, empty states, confirmations), page copy, notifications and emails, alt text and link text, numbers and dates, words that translate well, documentation and voice. Read before writing a page's copy, an interface's text or a document.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fwriting\u002FSKILL.md",[],[81,86,87,88,89,90,29,91,92,93,94,95],"text","emails","empty","drop","document","page","voice","notifications","documentation","translate",{"skillNo":97,"name":20,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"01M6D2HG07YS49NM196Q0R3AZ8","Designing or restyling an interface: direction, layout, type, colour, icons, components, states, responsive behaviour. Read before building a page, a screen or a set of components.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui\u002FSKILL.md",[],[20,102,103,104,105,91,106,29,21],"icons","components","SET","responsive","layout",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":39},"01M6D2HB59HZHWG1RYZDV4SJ91","ui-themes","Light and dark themes, and colour that holds in both: tokens with a value per theme, and what each kind of content needs to stay visible (icons, SVG drawings and line art, logos, photos, screenshots, charts, code, maps, borders, shadows, focus, form controls), switching without a flash, and checking both. Read before building a second theme or a theme toggle, and before any drawing, logo or chart on a page that has two themes.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-themes\u002FSKILL.md",[],[20,114,115,116,117,118,119,120,121,29,21,122,91,123,124,125,102,126,127],"ui themes","switching","photos","tokens","drawing","focus","maps","Art","flash","code","Charts","content","screenshots","logo",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":39},"01M6D2H5R5KRAE524C8QX0T7Q0","ui-structure","Structure before styling: the blueprint written before any interface code (the screen's job, the regions its kind of page needs, their order and why, the layout skeleton in numbers, the components and their states), the anatomy and order of a homepage, a dashboard, a list, a detail page, settings, a form, sign-in, pricing, docs, an article and a checkout, and how to turn the blueprint into code (tokens, layout primitives, components, sections, page). Read first, before building or rebuilding any page or screen.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-structure\u002FSKILL.md",[],[135,20,136,103,137,138,123,139,140,141,106,117,142,143,144,29,21,91,145,146],"structure","ui structure","pricing","dashboard","Blueprint","article","anatomy","styling","primitives","list","why","how",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":39},"01M6D2H0ZZBJG77MBGPZHA6MWD","ui-stack-vue","Building interfaces in Vue 3 and Nuxt: project layout, script setup with typed defineProps, defineEmits and defineModel, attribute fallthrough, slots and scoped slots, template refs, ref, reactive and computed, watch versus watchEffect, composables and VueUse, provide and inject, Pinia, keyed v-for, transitions, Nuxt 4 (app directory, pages, layouts, useFetch and useAsyncData keys, $fetch in handlers, server routes, runtime config, useSeoMeta, NuxtImg, middleware), VeeValidate forms, Reka UI and Nuxt UI, testing, vue-tsc, and the traps. Read when the project uses Vue or Nuxt.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-stack-vue\u002FSKILL.md",[],[20,154,155,156,157,158,159,160,106,78,161,162,29,163,164,165,166,167,168,169],"vue","stack","ui stack vue","forms","pages","watch","runtime","transitions","fetch","pinia","nuxt","template","server","config","directory","testing"]