{"id":21525841,"url":"https://github.com/bkwld/vue-detachable-header","last_synced_at":"2026-07-18T23:37:07.811Z","repository":{"id":45488568,"uuid":"343671672","full_name":"BKWLD/vue-detachable-header","owner":"BKWLD","description":"Vue component that wraps your header and renders at the top of the viewport when scrolling up.","archived":false,"fork":false,"pushed_at":"2022-10-13T17:56:23.000Z","size":83,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T08:17:51.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BKWLD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-02T06:39:50.000Z","updated_at":"2021-12-10T23:48:51.000Z","dependencies_parsed_at":"2022-07-19T00:17:00.521Z","dependency_job_id":null,"html_url":"https://github.com/BKWLD/vue-detachable-header","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/BKWLD/vue-detachable-header","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-detachable-header","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-detachable-header/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-detachable-header/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-detachable-header/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BKWLD","download_url":"https://codeload.github.com/BKWLD/vue-detachable-header/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-detachable-header/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35635260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T01:38:39.684Z","updated_at":"2026-07-18T23:37:07.791Z","avatar_url":"https://github.com/BKWLD.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-detachable-header\n\nWrap your header in this to get it to reveal itself in a detached state on scroll up. Elegantly handles the transition back to a docked state on scroll back to top.\n\n## Usage\n\n```js\nimport Vue from 'vue'\nimport DetachableHeader from 'vue-detachable-header'\nimport 'vue-detachable-header/index.css'\nVue.component('detachable-header', DetachableHeader)\n```\n```html\n\u003cdetachable-header :height=\"80\"\u003e\n  \u003cdesktop-header\u003e...\u003c/desktop-header\u003e\n\u003c/detachable-header\u003e\n```\n```css\n.desktop-header {\n\n  /* Fill the height of the detachable-header */\n  height: 100%;\n\n  /* Make the header text white at the top of the page */\n  color: white;\n  background: transparent;\n}\n\n/* Switch to inverterd styling when detached */\n.show-background .desktop-header {\n  color: black;\n  background: white;\n}\n```\n\n## Props\n\n| Name | Default | Description |\n| ---- | ------- | ----------- |\n| `height` | `undefined` | The height of the header as an integer. |\n| `offset` | `0` | Adjusts the `top` of the header by this amount when at the top of the page.  Useful when the site has a notification bar above the header; you would set this value to the height of the notification bar. |\n| `no-offset-when-detached` | `false` | When `false`, if there is an offset, the header respects the `offset` when detached (aka, when you have scrolled down the page a ways and then scrolled back up).  This is useful for notification bars that don't hide on scrol.  When `true`, the header has a `top` of `0` when it's detached. |\n| `reveal-transition` | `\"translate\"` | How the header enters when detached.  Supports \"translate\" and \"fade\". |\n| `force-background` | `false` | Forces `show-background` class. |\n| `force-reveal` | `false` | Forces reveal of detached state. |\n| `scroll` | `undefined` | Manually pass in the current scroll value. This could be useful when used with a smooth scrolling library. |\n| `offscreen-height` | `0` | Sets the offscreen height to account for headers that may have overflow on the lower edge |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkwld%2Fvue-detachable-header","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkwld%2Fvue-detachable-header","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkwld%2Fvue-detachable-header/lists"}