Linux 软件免费装
Banner图

SW34 Easy Scroll

开发者 studioweb34
更新时间 2026年10月22日 18:02
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

scrolling smooth scroll scroll animation lenis

下载

1.0.0 1.0.1 1.0.2

详情介绍:

Native scrolling jumps. It does the job, and it makes a carefully designed site feel a little cheaper than it is. SW34 Easy Scroll replaces that jump with motion that glides — on the mouse wheel, on the keyboard, and on every anchor link. It runs on Lenis, a well-regarded open-source scrolling library, bundled with the plugin. Everything lives on one settings screen, in plain language, with a real on/off switch at the top. The keyboard is where most smooth scrolling stops Scroll with the wheel: smooth. Press the down arrow: jump. Two contradictory behaviours on the same page — visitors feel it even when they cannot name it. It is not a bug. Lenis registers no keyboard listener at all, so almost nothing built on it handles the keyboard. SW34 Easy Scroll does. Arrow keys, Page Up and Page Down, Space, Home and End all glide, with a distance per arrow press you choose. It also knows when to stay out of the way. Form fields, buttons, video players, menus, sliders and scrollable panels keep their own key handling. Visitors who asked their system for reduced motion get the native keyboard back, untouched. Anchor links that land where you meant A one-page site lives on its anchor links, and they are exactly what tends to break: the page jumps instead of gliding, or the section you aimed at ends up hidden behind your sticky header. Both are handled. Set your header height once, and every #section link glides to the right place — whether the visitor clicks it, arrives from another page, or opens the address with the fragment already in it. The URL updates, the Back button works, and keyboard focus follows to the section, the way native navigation does. Themes that run their own anchor scrolling — Divi among them — no longer fight you for it. Tabs and accordions built on # links are recognised and left alone. You decide where it applies Smooth scrolling is not always welcome everywhere. Turn it off on a single page from the editor sidebar, or exclude whole sections of the site by path. Keep it for visitors and native for yourself while you build. Disable it on touch devices, or below a screen width you set. Hand scrolling back to any panel, map or modal with a CSS selector. In short What it does not do Worth knowing before you install, so nothing surprises you: No weight you did not ask for About 25 KB on your public pages, served from your own site. No CDN, no external request — not even to Studio Web 34. No cookie, no personal data, no tracking of any kind, no upsell banner in your admin. And the master switch is a real switch: turned off, the plugin loads no CSS and no JavaScript at all on the public site. For developers Six filters and actions (sw34_easy_scroll_options, _should_run, _config, _post_types, _settings_saved, _settings_reset), a JavaScript API on window.SW34EasyScroll with ready and destroyed events, and an optional window.lenis global for GSAP ScrollTrigger. The data-lenis-prevent attributes are honoured for the keyboard as well as the wheel. Lenis is bundled minified and as readable source, released under the MIT licence. If your theme already registered it, this plugin reuses that copy instead of loading a second one.

安装:

  1. Upload the sw34-easy-scroll folder to /wp-content/plugins/.
  2. Activate the plugin.
  3. Open the Smooth Scroll menu in the admin sidebar.
If your theme has a sticky header, enter its height under "Top offset" in the anchor links section, otherwise anchor targets end up underneath it.

屏幕截图:

  • The "Smooth scrolling" box in the editor sidebar, to turn smooth scrolling

其他记录:

Internationalization Source language is English. French (fr_FR) and Spanish (es_ES) catalogues are bundled — 108 strings, 104 translated in each; the four left untranslated are the plugin name, the author name and the two URLs, which stay the same in every language. Everything visible is translatable, including the strings used by the settings screen's JavaScript, which are passed through wp_localize_script() rather than written into the .js file where gettext would never see them. Credits Smooth scrolling is powered by Lenis 1.3.26 by darkroom.engineering, released under the MIT licence. Source repository: https://github.com/darkroomengineering/lenis — the bundled files are assets/js/lenis.min.js, its readable source assets/js/lenis.js, and the stylesheet assets/css/lenis.css. The licence text is in assets/js/LICENSE-lenis.txt.

常见问题:

Scrolling feels wrong inside a map, a code editor or a modal.

Add a CSS selector for that element under "Excluded areas". The data-lenis-prevent attribute is also recognised without any setting.

Can I use it with GSAP ScrollTrigger?

Yes. Enable "Expose the instance as window.lenis", then drive ScrollTrigger from the sw34-easy-scroll:ready event.

Does it work on mobile?

The plugin never smooths touch scrolling: native mobile scrolling is more responsive and better received, so there is no setting for it. Everything else still applies, and "Disable on touch devices" turns the plugin off entirely on phones and tablets if that is what you want.

How do I turn it off on one page?

Open that page in the editor and tick "Disable smooth scrolling on this page" in the Smooth scrolling box in the sidebar. For a whole section of the site, use a wildcard path such as /my-account/* under "Excluded pages" instead.

Can I keep native scrolling for myself while I build the site?

Yes. Set "Who gets smooth scrolling" to "Everyone except administrators".

Anchor links jump instead of gliding.

Check that "Animate anchor links" is on. When it is, this plugin takes anchor clicks in the capture phase and stops them there, so a theme running its own anchor scrolling — Divi does — cannot overwrite the animation. If you would rather keep your theme's behaviour, turn this setting off.

Can a scrollable area inside the page be animated too?

No. Lenis animates the document, not the boxes inside it. "Let nested areas scroll" only hands the wheel back to that box so the page does not move instead; the box then scrolls natively, without inertia. Animating it would take a second Lenis instance bound to that element.

The arrow keys scroll the page while I am filling in a form.

They should not — form fields are excluded. If it happens on a custom field, add a selector for it under "Excluded areas", and please report it.

更新日志:

1.0.2 1.0.1 1.0.0 First release.