Download the PHP package devletes/filament-progress-bar without Composer

On this page you can find all versions of the php package devletes/filament-progress-bar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-progress-bar

Filament Progress Bar

Latest Version on Packagist Total Downloads License GitHub Stars

Reusable progress bar components for Filament 5 tables and infolists.

Requirements

Installation

Then publish Filament assets so the package stylesheet is available to your panel:

The package ships its own stylesheet via Filament's asset manager — there is nothing to add to your custom Tailwind theme.

Quick start

Table column

Infolist entry

Providing data

The component accepts two styles of state:

1. A numeric value paired with maxValue(...):

2. A structured array containing both the current value and the total:

When the structured form is used, both keys are looked up flexibly. The first matching key wins:

Role Accepted keys
Current value progress, current, value, used
Total total, max, available, quota

A missing or zero total resolves to 0% rather than throwing.

Display

Size

Methods: size('xs' | 'sm' | 'md' | 'lg') / height(string $value)

size(...) controls the bar height and inside-text size. Defaults to sm. Invalid values fall back to the default.

xs is a bar-only size. At 1rem there is no room to stack text legibly on top of the fill, so an xs bar's text is hidden unless you move it below the bar with textPosition('outside'). Either way the value still reaches screen readers through aria-valuetext.

To go outside the four presets, height(...) sets the bar height to any valid CSS length — pixels, rems, viewport units, custom properties, or clamp()/calc() expressions:

height(...) overrides only the bar height — size(...) still drives the text sizing, so pair a custom height with the preset whose text reads best at that height (sm for slim bars, lg for tall ones). Pass null (or omit the call) to keep the height that size(...) resolves to (1.5rem / 2rem / 2.5rem).

Values containing ;, <, >, {, }, or quotes are silently dropped to prevent inline-style injection. Stick to standard CSS length syntax.

Text position

Method: textPosition('inside' | 'outside')

Show / hide value & percentage

Methods: showPercentage() / hidePercentage() / showProgressValue() / hideProgressValue()

Toggle each portion of the display text independently. When both are visible the text reads value / max (percentage). When only one is visible it appears alone. When both are hidden the bar renders without any text.

Border radius

Methods: borderRadius(string $value) / innerBorderRadius(string $value)

Override the bar's corner radius with any valid CSS length — pixels, rems, percentages, custom properties, or calc() expressions:

Pass null (or omit the call) to keep the default pill shape (9999px).

borderRadius(...) shapes the track and the fill together. innerBorderRadius(...) overrides the fill on its own, so the bar's outer silhouette and the shape of the progress edge can differ:

The most common use is '0': the track keeps its rounded outline (the fill is still clipped by it on the leading side), while the trailing edge of the fill ends in a flat vertical line instead of a rounded cap. Pass null (or omit the call) and the fill inherits whatever borderRadius(...) resolves to — the existing behavior.

Values containing ;, <, >, {, }, or quotes are silently dropped to prevent inline-style injection. Stick to standard CSS length syntax.

Thresholds and coloring

The bar resolves a status from the percentage and renders a color for that status. Two threshold APIs are available — start with the simple one and reach for the map only when three states aren't enough.

Three-state mode (default)

Methods: warningThreshold(int|float $percentage) / dangerThreshold(int|float $percentage)

success → warning → danger, with thresholds you can tune individually:

Defaults: warning = 70, danger = 90.

Threshold direction

Method: thresholdDirection('ascending' | 'descending')

By default higher percentages escalate toward danger (CPU, memory, used quota). For metrics where lower is worse (fuel, stock, battery), flip the direction:

In descending mode the package uses sane defaults (warning = 30, danger = 10) and clamps danger ≤ warning.

Threshold map (advanced)

Method: thresholds([$floor => $status])

For more than three states, or for non-monotonic mappings, pass a map of floor => status. The status name can be anything you want:

Keys are interpreted as percentage floors — the highest matching floor wins. The example above maps ≥80 to success, 60–79 to warning, 40–59 to info, and <40 to danger.

If you omit a 0 floor, the lowest-defined status extends down to 0. For example, [80 => 'success', 10 => 'info'] resolves 0–79 to info (no implicit success fallback below the lowest floor).

The three legacy statuses — success, warning, danger — keep their package defaults (var(--success-500), var(--warning-500), var(--danger-500)). Any other status name (e.g. info, gray, secondary, or a custom one registered via your panel's ->colors([...])) auto-resolves to var(--{status}-500). No extra configuration needed.

For one-off colors that don't map to a Filament color (e.g. you want a specific 'excellent' status to be a particular shade of green), use statusColors([...]):

Likewise, custom labels for any status name go through statusLabels([...]):

Colors

Methods: successColor(string $color) / warningColor(string $color) / dangerColor(string $color) / statusColors([$status => $color]) / trackColor(string $color)

Three named setters cover the default statuses. Each accepts any CSS color value or a closure:

Defaults reference Filament's semantic CSS variables (var(--success-500), var(--warning-500), var(--danger-500)), so the bar inherits your panel's theme automatically. To render a healthy bar in your brand color instead, pass ->successColor('var(--primary-500)').

For custom statuses (map mode), use statusColors([...]). When both statusColors and the named setters define the same status, the map wins — named setters fill in any keys the map omits.

Those setters all color the fill. trackColor(...) colors the track behind it, replacing the neutral gray with any valid CSS color value — including a custom property, so the track can follow your theme:

A custom track color wins in both light and dark mode, replacing the package defaults (rgb(229 231 235) and rgb(255 255 255 / 0.1)). To keep the track theme-aware, pass a CSS variable your panel theme redefines per mode rather than a fixed color:

Pass null (or omit the call) to keep the dark-mode-aware default.

Values containing ;, <, >, {, }, or quotes are silently dropped to prevent inline-style injection. Stick to standard CSS color syntax.

Labels

Methods: successLabel(string $label) / warningLabel(string $label) / dangerLabel(string $label) / statusLabels([$status => $label])

Per-status labels are shown above the bar in infolist entries only (table columns intentionally skip them for compact rows). They accept a string or a closure receiving useful context:

For custom statuses (map mode), use statusLabels([...]).

Closure parameters

Most setters accept a closure. The following parameters are injected when present:

The percentage- and status-aware parameters are populated after the bar's value has been resolved, so closures used for colors and labels can branch on the final percentage.

Recipes

Battery / fuel (low is bad):

Multi-state quality score (using Filament's built-in colors):

Squared bars matching a card design system:

Compact column without any text overlay:

Dynamic per-record color:

Infolist entry with icon, inline label, and rich danger text:

API reference

Value

Method Notes
maxValue(int\|float\|Closure\|null) Used with a numeric state value
state(...) / getStateUsing(...) Filament native; pass a structured array for current+total

Display

Method Notes
size('xs'\|'sm'\|'md'\|'lg') Default sm; xs hides its text unless textPosition('outside')
height(string\|Closure\|null) Any CSS length; overrides the height from size(...)
textPosition('inside'\|'outside') Default inside
showPercentage(bool\|Closure) / hidePercentage(bool\|Closure) Default shown
showProgressValue(bool\|Closure) / hideProgressValue(bool\|Closure) Default shown
borderRadius(string\|Closure\|null) Any CSS length; default pill
innerBorderRadius(string\|Closure\|null) Any CSS length; shapes the fill only, defaults to borderRadius(...)

Thresholds

Method Notes
warningThreshold(int\|float\|Closure) Default 70 (or 30 in descending)
dangerThreshold(int\|float\|Closure) Default 90 (or 10 in descending)
thresholdDirection('ascending'\|'descending'\|Closure) Default ascending
thresholds(array\|Closure) Tier overrides OR a [floor => status] map

Colors

Method Notes
successColor(string\|Closure\|null) Default var(--success-500)
warningColor(string\|Closure\|null) Default var(--warning-500)
dangerColor(string\|Closure\|null) Default var(--danger-500)
statusColors(array\|Closure\|null) Map of status => color for custom statuses
trackColor(string\|Closure\|null) Any CSS color; default neutral gray, dark-mode aware

Labels (infolist entries only)

Method Notes
successLabel(string\|Closure\|null) Hidden by default
warningLabel(string\|Closure\|null) Hidden by default
dangerLabel(string\|Closure\|null) Hidden by default
statusLabels(array\|Closure\|null) Map of status => label for custom statuses

Infolist-only

The ProgressBarEntry extends Filament's Entry and supports the standard label(...), inlineLabel(), hiddenLabel(), icon(...), and iconColor(...) methods.

Integration examples

A ProgressBarColumn rendered inside a Filament resource table, one row per option — sizes, text position, thresholds, border radius, custom height, a flat inner radius, and a tinted track:

A ProgressBarEntry inside an infolist with icons, custom labels, a tall height(...) bar whose fill ends flat via innerBorderRadius('0'), a trackColor(...) tinted track, and a descending-threshold "Stock remaining" bar:

Need something custom?

We build production Filament panels and plugins for teams that want to ship fast without compromising on polish. If you need a custom feature, an extended variant of this package, or a fully bespoke component built for your stack, we can help.

Typical engagements: new Filament plugins, custom resources/widgets/actions, theme + UX work, integrations with your existing services, and one-off tailored forks of our open-source packages.

Have you seen our Orbit theme?

Orbit is our dark-first theme for Filament 5. Every panel surface is restyled — sidebar, topbar, forms, tables, modals, notifications.

Orbit theme, light mode Orbit theme, dark mode

Check it out here →

Credits

License

MIT. See LICENSE.md.


All versions of filament-progress-bar with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devletes/filament-progress-bar contains the following files

Loading the files please wait ...