Skip to main content
ProgressBar ← Back to Table of Contents

Summary

Versatile linear progress indicator for uploads, sync status, stepped delivery trackers, and multi-segment bars. Supports animations, gradients, and optional card shell wrapping.
ClassBjanczak\FilamentFlexFields\Filament\Schemas\Components\ProgressBar
StateNone — display-only schema component
Playgroundprogress-bar slug in Flex Fields playground
StylesheetLazy progress-bar bundle

Basic usage

Simple determinate progress

use Bjanczak\FilamentFlexFields\Filament\Schemas\Components\ProgressBar;

ProgressBar::make()
    ->label('Upload progress')
    ->value(65)
    ->max(100)
    ->showValue()
    ->color('success');

Indeterminate loading state

ProgressBar::make()
    ->label('Syncing data...')
    ->indeterminate()
    ->color('primary');

Stepped delivery tracker

ProgressBar::make()
    ->segments([
        ['label' => 'Ordered', 'description' => 'Completed'],
        ['label' => 'Shipped', 'description' => 'In transit'],
        ['label' => 'Delivered', 'description' => 'Pending'],
    ])
    ->activeSegment(1)
    ->activeSegmentProgress(0.5)
    ->color('success');

Configuration API

All methods accept Closure unless noted.
MethodTypeDefaultDescription
value(float|int|Closure|null $value)Setup0Current progress value.
max(float|int|Closure $max)Setup100Maximum progress value.
label(string|Closure|null $label)SetupnullHeader text shown above the track.
displayValue(string|Closure|null $value)SetupnullCustom formatted value string (e.g., “3 of 5 files”).
showValue(bool|Closure $condition = true)SetuptrueShow percentage or display value in the header.
valueBadge(bool|Closure $condition = true)SetupfalseRender the value as a pill badge in the header.
color(string|Closure|null $color)SetupprimarySemantic color: primary, success, warning, danger.
indeterminate(bool|Closure $condition = true)SetupfalseAnimated loading bar for unknown progress.
variant(string|Closure $variant)Setup'track'track (continuous) or pills (segmented).
pillCount(int|Closure $count)SetupnullNumber of segments in pills variant.
gradientFrom(string|Closure|null $color)SetupnullStart color for gradient fill.
gradientTo(string|Closure|null $color)SetupnullEnd color for gradient fill.
segments(array|Closure|null $segments)SetupnullArray of step metadata for delivery-tracker mode.
activeSegment(int|Closure|null $index)Setupnull0-based index of the active step.
activeSegmentProgress(float|Closure $progress)Setup0.62Partial fill (0–1) within the active step.
segmentThumb(bool|Closure $condition = true)SetupautoShow a thumb indicator on the active segment.
startMarker(mixed $icon)SetupnullIcon at the beginning of the track.
currentMarker(mixed $icon)SetupnullIcon at the current progress position.
endMarker(mixed $icon)SetupnullIcon at the end of the track.
remainingTrackStyle(string $style)Setup'solid'Style of unfilled track: solid or dashed.
shell(bool|Closure $condition = true)SetupfalseWrap in an elevated card container.
description(string|Closure $text)SetupnullSubtitle text (requires shell()).
footer(string|Closure $text)SetupnullFooter text (requires shell()).
size(string|Closure $size)Setup'md'Track height: sm, md, lg.
animated(bool|Closure $condition = true)SetuptrueAnimate fill transitions.
animationDuration(int|Closure $ms)Setup400Transition duration in milliseconds.

Real-world examples

Animated file upload (Livewire)

ProgressBar::make()
    ->label('Uploading photos')
    ->value(fn () => $this->uploadProgress)
    ->showValue()
    ->animated()
    ->color('primary');

Delivery route with markers

ProgressBar::make()
    ->label('Delivery Status')
    ->value(45)
    ->startMarker('heroicon-o-map-pin')
    ->currentMarker('heroicon-o-truck')
    ->endMarker('heroicon-o-home')
    ->remainingTrackStyle('dashed')
    ->color('success');

Playground

/admin/flex-fields-playground/progress-bar See Playground for setup.
ComponentWhen to use instead
ProgressCircleCircular or semi-circular progress display.
RatingFieldWhen the “progress” represents a user rating or score.
SegmentControlFor interactive selection between discrete options.

CSS classes (reference)

ClassRole
fff-progress-barRoot container
fff-progress-bar--{sm|md|lg}Size variant
fff-progress-bar--indeterminateIndeterminate animation state
fff-progress-bar--pillsPill variant modifier
fff-progress-bar--segmentsStepped tracker modifier
fff-progress-bar--has-shellCard shell wrapper active
fff-progress-bar__trackMain track background
fff-progress-bar__fillAnimated fill element
fff-progress-bar__markerIcon marker wrapper
fff-progress-bar__segmentIndividual step in tracker mode