PHPackages                             mphpmaster/laravel-scroll-to-top - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mphpmaster/laravel-scroll-to-top

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mphpmaster/laravel-scroll-to-top
================================

Laravel Scroll page to top package.

1.1.1(2y ago)0205MITJavaScriptPHP &gt;=8.1

Since Dec 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mPhpMaster/laravel-scroll-to-top)[ Packagist](https://packagist.org/packages/mphpmaster/laravel-scroll-to-top)[ RSS](/packages/mphpmaster-laravel-scroll-to-top/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Laravel Scroll page to top package.
===================================

[](#laravel-scroll-page-to-top-package)

Dependencies:
-------------

[](#dependencies)

- php &gt;=8.1 **REQUIRED IN YOUR PROJECT**
- laravel &gt;=9 **REQUIRED IN YOUR PROJECT**
- illuminate/support &gt;=9 *composer will install it automaticly*
- laravel/helpers ^1.5 *composer will install it automaticly*

Installation:
-------------

[](#installation)

```
composer require mphpmaster/laravel-scroll-to-top
```

You can publish the config file with:

```
php artisan vendor:publish --tag="scroll-to-top-config"
```

This is the contents of the published config file:

```
return [
	// accepts string
	'tag'              => 'button',

	// accepts empty|array|string
	'attributes'       => [
		'type' => 'button',
	],

	// accepts empty|string
	'toggle_key'       => 'alt+t',

	// accepts empty
	"radius"           => "10px",

	// accepts empty
	"padding"          => "10px",

	// falsy value = 20
	"minHeight"        => 20,

	/*
	 * x value to scroll to when button clicked.
	 *
	 * accepts number
	 */
	"scrollToPosition" => 0,

	/*
	 * Scroll behavior when button clicked.
	 * possible values: 'auto' | 'instant' | 'smooth'
	 * accepts string
	 */
	"scrollBehavior"   => 'smooth',

	// accepts empty string (it will read html dir attribute)
	"direction"        => "",

	// accepts empty
	"startSpaceSize"   => "30px",

	// accepts empty
	"bottomSpaceSize"  => "20px",

	// accepts empty|array|string
	"classes"          => [
		'inline-flex',
		'items-center',
		'justify-center',
		'focus:ring',
		'focus:ring-primary-200',
		'focus:outline-none',
		'rounded',
		'scrollToTop--Button',
		'align-middle',
		'text-primary-500',
		'hover:text-primary-600',
		'focus:text-primary-400 active:text-primary-600',
	],

	// accepts empty|string
	"content"          =>
```

> **Important**: Do not forget to modify the config.

License
-------

[](#license)

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

This Helper is open-sourced software licensed under the [MIT license](https://github.com/mPhpMaster/laravel-scroll-to-top/blob/master/LICENSE).

---

Stand with Palestine 🇵🇸 *\#FreePalestine*
-----------------------------------------

[](#stand-with-palestine--freepalestine)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

928d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59211285?v=4)[Moh. Php Master ..](/maintainers/mPhpMaster)[@mPhpMaster](https://github.com/mPhpMaster)

---

Top Contributors

[![mPhpMaster](https://avatars.githubusercontent.com/u/59211285?v=4)](https://github.com/mPhpMaster "mPhpMaster (5 commits)")

---

Tags

laravelscrollScroll page to top

### Embed Badge

![Health badge](/badges/mphpmaster-laravel-scroll-to-top/health.svg)

```
[![Health](https://phpackages.com/badges/mphpmaster-laravel-scroll-to-top/health.svg)](https://phpackages.com/packages/mphpmaster-laravel-scroll-to-top)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
