Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
N

Progress Bar Field

This package is possibly abandoned. Please proceed with care.

Readme

Nova ProgressBar Field

Latest Version on Packagist Total Downloads License

This package allows you to add progressbar fields to your resources and dashboards in Nova.

It basically takes a field with a decimal value between 0 and 1 and shows it as a percentage progress bar.

It edits like a text field.

index example

detail example

form example

DISCLAIMER:

This package is still work in progress. Feel free to help improve it.


Requirements


Installation

Just run:

composer require Signifly/nova-progressbar-field

After this the setup will be complete and you can use the components listed here.


Basic Usage

// in App\Nova\User
...
use signifly\Nova\Fields\ProgressBar\ProgressBar;
...

/**
 * Get the fields available for the request.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return array
 */
public function fields(Request $request)
{
    return [
        ProgressBar::make('Awesomeness'),
    ];
}

Advanced Options

Custom color

public function cards(Request $request)
{
    return [
        ProgressBar::make('Awesomeness')
            ->options([
                'color' => '#FFEA82',
            ]),
    ];
}

Animate Bar Color A -> B

public function cards(Request $request)
{
    return [
        ProgressBar::make('Awesomeness')
            ->options([
                'fromColor' => '#FFEA82',
                'toColor' => '#40BF55',
                'animateColor' => true,
            ]),
    ];
}

Feel free to come with suggestions for improvements.

Back to Top
Added 6 years ago
Last updated 6 Years Ago
Version v0.0.2
Composer
Signifly/nova-progressbar-field
GitHub stars 5
Packagist downloads 405,237

Favorites

18 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
1 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas