Skip to content

wpdevup/tap-top

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Tap Top โ€“ Advanced Back to Top Button for WordPress


๐ŸŽ‰ What's New in v1.3.0

โœจ 6 Unique Button Shapes

Choose from stunning button shapes that no other plugin offers:

  • Circle - Classic round button (default)
  • Square - Modern angular design
  • Rounded Square - Soft, friendly corners
  • Pill - Sleek capsule shape
  • Pentagon - Unique 5-sided polygon
  • Hexagon - Geometric 6-sided design

๐ŸŽฌ 6 Smooth Animation Styles

Engaging animations that respect user preferences:

  • Fade - Classic smooth transition
  • Slide - Slides up from bottom
  • Scale - Dynamic zoom effect
  • Bounce - Playful bounce animation
  • Rotate - Eye-catching spin entrance
  • Flip - Dramatic 3D flip effect

๐Ÿ‘† Smart Hide on Scroll Down

NEW UX-Optimized Feature:

  • Button automatically hides when scrolling down
  • Instantly reappears when scrolling up
  • Reduces visual clutter during content reading
  • Smooth transitions with accessibility support
  • Works perfectly with all animation styles

๐ŸŽฏ Why Tap Top?

Most back-to-top plugins break when used with modern smooth scroll libraries like Lenis, Locomotive Scroll, or SmoothScrollbar. They fight against the scroll behavior, causing jarring jumps and broken animations.

Tap Top is different. It automatically detects your scroll library and uses its native API for seamless integration.

The Problem with Other Plugins

// โŒ Other plugins do this:
window.scrollTo(0, 0); // Breaks smooth scroll libraries!

// โœ… Tap Top does this:
lenis.scrollTo(0, { duration: 0.6 }); // Works perfectly!

โœจ Features

๐ŸŽจ Visual Customization (NEW in v1.3.0)

6 Unique Button Shapes

Circle          โšซ  Classic round button
Square          โฌœ  Sharp, modern look
Rounded Square  โฌ›  Soft corners
Pill            ๐Ÿ’Š  Capsule shape
Pentagon        โฌŸ   5-sided polygon
Hexagon         โฌข   6-sided polygon

6 Smooth Animation Styles

Fade     Classic smooth fade in/out
Slide    Slides up from bottom edge
Scale    Zoom in/out effect
Bounce   Playful bounce animation
Rotate   Spinning entrance/exit
Flip     Dramatic 3D flip effect

All animations respect prefers-reduced-motion for accessibility.

๐Ÿ‘† Smart Behavior (NEW in v1.3.0)

Hide on Scroll Down

  • Auto-hide: Button hides when scrolling down
  • Auto-show: Reappears instantly when scrolling up
  • UX Optimized: Reduces distraction during reading
  • Smooth: Works with all animation styles
  • Performance: Efficient scroll direction detection

๐Ÿ”Œ Smart Library Detection

Automatically detects and integrates with popular scroll libraries:

  • Lenis - Uses lenis.scrollTo() with proper easing
  • Locomotive Scroll - Uses locomotive.scrollTo() with momentum
  • SmoothScrollbar - Uses native scrollbar.scrollTo()
  • Custom Containers - Detects nested scroll implementations
  • Native Fallback - Custom smooth scroll for standard sites

๐Ÿ”— Universal Anchor Link Fixes

The only WordPress plugin that fixes anchor links across all scroll libraries:

  • โœ… Table of contents navigation works properly
  • โœ… Hash URLs (yoursite.com/page#section) work on page load
  • โœ… Smooth scrolling to anchors with offset detection
  • โœ… Automatic sticky header compensation
  • โœ… Works with WoodMart, Elementor, and all major themes

๐Ÿ“ฑ Adaptive Positioning System

Intelligently avoids UI conflicts:

  • Cookie Banners - Automatically repositions above GDPR notices
  • Chat Widgets - Detects LiveChat, Tawk.to, Intercom, etc.
  • Mobile Safe Areas - Full support for iPhone notches, Android punch-holes
  • Gesture Bars - Respects iOS and Android navigation gestures
  • Real-time Detection - Responds to dynamic layout changes

โšก Three Display Modes

Global Mode

Traditional site-wide button with centralized settings:

โœ“ Configure once, works everywhere
โœ“ Show/hide rules based on page types
โœ“ Exclude specific posts/pages

Block-Only Mode

Complete per-page control via Gutenberg:

โœ“ Add blocks only where needed
โœ“ Each block has independent settings
โœ“ Different colors/positions per page
โœ“ NEW: Different shapes and animations per page

Hybrid Mode (Recommended)

Best of both worlds:

โœ“ Global settings as default
โœ“ Blocks override on specific pages
โœ“ Maximum flexibility

๐ŸŽจ Scroll Progress Ring

Beautiful circular progress indicator:

  • Real-time scroll progress (0-100%)
  • Customizable colors and width
  • Smooth 60fps animations
  • Automatically disabled for users with motion sensitivity

โ™ฟ Accessibility First

WCAG 2.1 AA compliant out of the box:

  • โœ… Respects prefers-reduced-motion
  • โœ… Proper ARIA labels and roles
  • โœ… Full keyboard navigation support
  • โœ… Screen reader friendly
  • โœ… High contrast mode compatible
  • โœ… Focus management with visible indicators

๐Ÿš€ Performance Optimized

  • Zero Dependencies - No jQuery or external libraries
  • Lazy Loading - Only initializes when needed
  • GPU Acceleration - Hardware-accelerated animations
  • Efficient Events - Proper throttling and debouncing
  • Minimal DOM - Lightweight footprint
  • No Memory Leaks - Proper cleanup and disposal

๐Ÿ“ธ Screenshots

Version 1.3.0 Screenshots Coming Soon


๐Ÿš€ Installation

Method 1: WordPress.org (Recommended)

  1. Go to Plugins โ†’ Add New in WordPress admin
  2. Search for "Tap Top"
  3. Click Install Now โ†’ Activate
  4. Go to Tap Top menu to customize

Method 2: Manual Upload

  1. Download latest release from WordPress.org
  2. Go to Plugins โ†’ Add New โ†’ Upload Plugin
  3. Choose the downloaded ZIP file
  4. Click Install Now โ†’ Activate

Method 3: FTP Upload

  1. Download and unzip the plugin
  2. Upload tap-top folder to /wp-content/plugins/
  3. Activate via WordPress admin

Method 4: Composer

composer require wpackagist-plugin/tap-top

๐Ÿ“– Documentation

Quick Start

Using Global Mode

  1. Go to Tap Top โ†’ Settings in WordPress admin
  2. Ensure Display Mode is set to Global Mode
  3. Enable Show on Posts and Show on Pages
  4. NEW: Choose your preferred Button Shape
  5. NEW: Select an Animation Style
  6. NEW: Enable Hide on Scroll Down for better UX
  7. Customize colors, position, and size
  8. Save changes

The button will now appear site-wide based on your settings.

Using Gutenberg Blocks

  1. Edit any post or page
  2. Add Tap Top Button block
  3. Customize in block settings panel:
    • NEW: Button Shape (6 options)
    • NEW: Animation Style (6 options)
    • NEW: Hide on Scroll Down
    • Colors (background, icon, progress ring)
    • Position (left or right)
    • Size and offsets
    • Enable/disable progress ring
  4. Publish the page

Each block has independent settings.


Configuration Options

Display Control

Setting Description Default
Enable Plugin Master on/off switch On
Display Mode Global / Block-Only / Hybrid Global
Adaptive Positioning Smart obstruction avoidance On
Show on Homepage Display on front page On
Show on Posts Display on single posts On
Show on Pages Display on single pages On
Show on Archives Display on category/tag pages On
Show on Search Display on search results On

Appearance (NEW in v1.3.0)

Setting Description Default
Button Shape Circle / Square / Rounded / Pill / Pentagon / Hexagon Circle
Animation Style Fade / Slide / Scale / Bounce / Rotate / Flip Fade
Position Bottom Right / Bottom Left Right
Button Size Size in pixels (24-80) 48px
Background Color Button background color #111111
Icon Color Arrow icon color #ffffff
Bottom Offset Distance from bottom (8-100px) 24px
Side Offset Distance from side (8-100px) 24px

Behavior (NEW in v1.3.0)

Setting Description Default
Hide on Scroll Down Auto-hide when scrolling down Off

Progress Ring

Setting Description Default
Enable Progress Ring Show scroll progress Off
Progress Color Ring foreground color #007cba
Ring Width Thickness in pixels (1-10) 3px
Background Color Ring background (supports rgba) rgba(255,255,255,0.2)

๐ŸŽญ Demo

Shape Examples

Try all 6 shapes:

  • Circle: Classic and universally recognized
  • Square: Modern, sharp aesthetic
  • Rounded Square: Friendly and approachable
  • Pill: Sleek capsule design
  • Pentagon: Unique geometric shape
  • Hexagon: Technical, modern look

Animation Examples

Experience all 6 animations:

  • Fade: Smooth, subtle entrance
  • Slide: Directional slide-up
  • Scale: Dynamic zoom effect
  • Bounce: Playful and energetic
  • Rotate: Spinning entrance
  • Flip: Dramatic 3D effect

Hide on Scroll Demo

See the smart behavior:

  1. Scroll down โ†’ Button hides
  2. Scroll up โ†’ Button appears
  3. Reduces clutter during reading
  4. Smooth transitions

๐Ÿ› ๏ธ Development

Requirements

  • WordPress 5.6+
  • PHP 7.2+
  • Modern browser with ES6+ support

Local Setup

# Clone repository
git clone https://github.com/wpdevup/tap-top.git
cd tap-top

# No build process needed - it's pure PHP/JS/CSS!
# Just symlink to your WordPress plugins directory:
ln -s $(pwd) /path/to/wordpress/wp-content/plugins/tap-top

# Or copy the folder:
cp -r . /path/to/wordpress/wp-content/plugins/tap-top

File Structure (Updated v1.3.0)

tap-top/
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ”œโ”€โ”€ taptop.css              # Frontend styles (UPDATED: shapes & animations)
โ”‚   โ”‚   โ”œโ”€โ”€ taptop-admin.css        # Admin panel styles
โ”‚   โ”‚   โ””โ”€โ”€ taptop-block.css        # Block editor styles
โ”‚   โ””โ”€โ”€ js/
โ”‚       โ”œโ”€โ”€ taptop.js               # Main script (UPDATED: hide on scroll)
โ”‚       โ”œโ”€โ”€ taptop-admin.js         # Admin panel functionality
โ”‚       โ””โ”€โ”€ taptop-block.js         # Gutenberg block (UPDATED: new options)
โ”œโ”€โ”€ includes/
โ”‚   โ”œโ”€โ”€ class-taptop-settings.php   # Settings page (UPDATED: new options)
โ”‚   โ””โ”€โ”€ class-taptop-block.php      # Block registration (UPDATED)
โ”œโ”€โ”€ languages/
โ”‚   โ””โ”€โ”€ tap-top.pot                 # Translation template
โ”œโ”€โ”€ tap-top.php                     # Main plugin file (v1.3.0)
โ”œโ”€โ”€ readme.txt                      # WordPress.org readme (UPDATED)
โ”œโ”€โ”€ README.md                       # This file (UPDATED)
โ”œโ”€โ”€ LICENSE                         # GPL-2.0+ license
โ””โ”€โ”€ uninstall.php                   # Cleanup on uninstall

๐Ÿ“ Changelog

1.3.0 - 2025-01-20

๐ŸŽ‰ Major Feature Release

New Features:

  • โœจ 6 Unique Button Shapes - Circle, Square, Rounded Square, Pill, Pentagon, Hexagon
  • โœจ 6 Smooth Animation Styles - Fade, Slide, Scale, Bounce, Rotate, Flip (3D)
  • โœจ Hide on Scroll Down - Smart auto-hide behavior for improved UX

Improvements:

  • ๐ŸŽจ Enhanced CSS with shape-specific styling and clip-path support
  • โšก Optimized animations with GPU acceleration
  • ๐Ÿ“ฑ Better mobile performance with shape rendering
  • ๐Ÿ”ง Improved animation transitions with prefers-reduced-motion support
  • ๐Ÿ’ซ Smooth state transitions for hide-on-scroll feature

Technical:

  • New CSS classes for shapes: .shape-circle, .shape-square, .shape-rounded-square, .shape-pill, .shape-pentagon, .shape-hexagon
  • New animation classes: .anim-fade, .anim-slide, .anim-scale, .anim-bounce, .anim-rotate, .anim-flip
  • Smart scroll direction detection for hide-on-scroll
  • Enhanced Gutenberg block with shape and animation previews
  • Full backward compatibility with v1.2.x

Compatibility:

  • WordPress 5.6+ (tested up to 6.8)
  • PHP 7.2+
  • All modern browsers with CSS clip-path support
  • Graceful degradation for older browsers

1.2.0 - 2025-01-15

โœจ Major Release - WordPress.org Approved

New Features:

  • โœจ Universal anchor link fixes - works across all scroll libraries
  • โœจ Advanced scroll library detection (Lenis, Locomotive, SmoothScrollbar)
  • โœจ Adaptive obstruction avoidance system
  • โœจ Full Gutenberg block integration with Site Editor support
  • โœจ Three display modes (Global, Block-Only, Hybrid)
  • โœจ Scroll progress ring with accessibility support
  • โœจ Mobile safe-area support for notched devices
  • โœจ WCAG 2.1 AA accessibility compliance

Improvements:

  • ๐Ÿš€ Performance optimizations (lazy loading, efficient animations)
  • ๐ŸŽจ Modern CSS with custom properties and forced-colors support
  • ๐Ÿ“ฑ Mobile-first responsive design
  • ๐Ÿ”ง Better WordPress coding standards compliance
  • ๐Ÿ“š Complete documentation with examples

1.1.0 - 2024-10-01

  • Initial release with basic functionality

View full changelog โ†’


๐Ÿ“„ License

This project is licensed under the GNU General Public License v2.0 or later.

Copyright (C) 2024-2025 iruserwp9

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

See LICENSE file for full details.


๐Ÿ”— Links


๐Ÿ’– Support the Project

If you find Tap Top useful, please consider:

  • โญ Star this repository - Show your support
  • ๐Ÿ› Report bugs - Help improve the plugin
  • ๐Ÿ’ก Suggest features - Share your ideas
  • โœ๏ธ Write a review - Help others discover Tap Top
  • ๐ŸŒ Translate - Make it available in your language

๐Ÿ™ Acknowledgments

Built with:

  • โค๏ธ Love for WordPress community
  • ๐ŸŽจ Inspiration from modern web design
  • ๐Ÿ”ง Feedback from real users
  • ๐Ÿ“š WordPress Coding Standards
  • โ™ฟ WCAG Accessibility Guidelines

Special thanks to:

  • All contributors and beta testers
  • WordPress Plugin Review Team
  • Scroll library maintainers (Lenis, Locomotive, SmoothScrollbar)
  • Everyone who provided feedback and suggestions
  • Design inspiration from modern web applications

๐Ÿ“ฎ Contact


Made with โค๏ธ for the WordPress community

Version 1.3.0 - Now with 6 Unique Shapes & Smooth Animations!

โฌ† Back to Top

About

Advanced WordPress back-to-top button with smart scroll library detection (Lenis/Locomotive/SmoothScrollbar), universal anchor fixes, adaptive positioning, progress ring, and full accessibility support. No jQuery required.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors