Experimental Go To Top Plugin For WordPress

We have been strongly advocating leveraging WordPress packages to build plugins and apps. From using them on client projects to side projects we have embraced them as much as possible. We even shared our thoughts on the same at WordCamp Mumbai.

Embracing WordPress Packages

As part of constant learning and discovery, we encourage our team to build things they want to. A few months back we were working with one of our client and they had this hard requirement of having a go-to top-button plugin with flexible customization. We vetted a few plugins and thought it was a good opportunity to build something from scratch.

The condition here we set was not to build it the traditional way. Instead, it should follow the path WordPress is on and use the react and relevant core packages. From UI/UX to technical implementation should follow the way we have in core.

Considering all this in mind we crafted the plugin using all the @wordpress packages for the build process, UI, and nearly everything possible. UI patterns have been picked from the core to make this look as closely possible to core WordPress.

Following all the rules we set, we have a WordPress plugin powered by the following packages:

  • @wordpress/scripts for the build process
  • @wordpress/components for UI
  • @wordpress/icons for icons
  • @wordpress/data for accessing data via Rest API

The plugin is open-source and available to explore. This will serve as a fork, build, and learn for our team and anyone looking for the same.