From 20a06b621fa5a35f01334750d9ddaf84ce1a7be9 Mon Sep 17 00:00:00 2001 From: smastrom Date: Tue, 14 Nov 2023 23:42:38 +0100 Subject: [PATCH] Pkg - Drop new README --- README.md | 86 ++++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index ecf70f0..7655c12 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,11 @@ Turn your boring fixed header into a smart one with three lines of code. ## Features -- **Dead simple** - Write three lines of code and you're done. -- **Enjoyable defaults** - When scrolling down, the header is hidden, when scrolling up, the header is shown. -- **Powerful** - Uses acceleration delta (scroll speed) for both hiding and showing instead of fixed thresholds. -- **Intuitive** - Behaves as expected on page load, scroll restoration, hovering, dropdown navigation, top-reached and reduced motion. -- **Smart** - Functionalities are automatically enabled/disabled if your header turns from fixed/sticky to something else or it is hidden at different viewports -- **Flexible** - Works with any scrolling container and with your own styles +- **Dead simple** - Write three lines of code and you're ready to go +- **Enjoyable** - When scrolling down, the header is hidden, when scrolling up, the header is shown. +- **Smart** - Behaves as expected on page load, scroll restoration, hovering, dropdown navigation, top-reached and reduced motion. +- **Dynamic** - Functionalities are automatically enabled/disabled if your header turns from fixed/sticky to something else or it is hidden at different viewports +- **Flexible** - Works with any scrolling container
@@ -27,8 +26,6 @@ Turn your boring fixed header into a smart one with three lines of code. pnpm add vue-use-fixed-header ``` -Or: - ```bash yarn add vue-use-fixed-header ``` @@ -78,9 +75,9 @@ On resize, `useFixedHeader` checks your header's `position` and `display` proper _Disabled_ means that no event listeners are attached and the returned styles match an empty object `{}`. -### Different viewports +### Media queries -Hence feel free to have code like this: +Hence feel free to have code like this, it will just work as expected: ```css .Header { @@ -102,13 +99,11 @@ Hence feel free to have code like this: } ``` -It will just work as expected. - ### Advanced scenarios -Let's suppose your header in some pages is not fixed/sticky and you're using some reactive logic to style the `position` property. +Let's suppose your header in some pages is not fixed/sticky and you're using some reactive logic to determine whether it should be or not. -You can pass a reactive source to the `watch` property of `useFixedHeader` to perform a check everytime the value changes: +You can pass a signal to the `watch` property of `useFixedHeader` to perform a check everytime the value changes: ```vue