- Getting Started
- Architecture
- The Basics
- Digging Deeper
-
EDGE Components
- Introduction
- Activity Indicator
- Badge
- Bottom Navigation
- Bottom Sheet
- Button
- Button Group
- Canvas
- Carousel
- Checkbox
- Chip
- Column
- Divider
- Gesture Area
- Icon
- Image
- Lazy Grid
- Layout & Styling
- List
- Menus
- Modal
- Pressable
- Progress Bar
- Radio Group
- Refreshable
- Row
- Scroll View
- Select
- Shapes
- Side Navigation
- Slider
- Spacer
- Stack
- Tab Row
- Text
- Text Input
- Toggle
- Top Bar
- Virtual List
- Web View
- Plugins
- Testing
- Publishing Your App
Progress Bar
Get the Jump app
You'll need the free Jump app to preview this page on your device. Install it, then scan the code again.
Overview#
A linear progress indicator. When value is supplied, renders as determinate progress in [0.0, 1.0]. Without a
value (or with indeterminate), renders an animated wave.
For a circular spinner use <native:activity-indicator> instead.
Per Material 3, the progress fill uses theme.primary and the track uses theme.surfaceVariant. The optional color
prop is an escape hatch for non-theme containers.
Copied!
<native:progress-bar :value="0.65" />
Props#
value- Current progress in[0.0, 1.0](optional, float). Settingvalueimpliesindeterminate=falseindeterminate- Force indeterminate mode (optional, boolean, default:falsewhenvalueis set, otherwisetrue)color- Override the fill color as hex string (optional)track-color- Override the track color as hex string (optional)a11y-label- Accessibility label (optional)a11y-hint- Accessibility hint (optional)
Examples#
Determinate#
Copied!
@php $progress = 0.65; @endphp <native:column class="w-full gap-2 p-4"> <native:row class="w-full justify-between"> <native:text class="text-sm text-theme-on-surface">Uploading</native:text> <native:text class="text-sm text-theme-on-surface-variant">{{ round($progress * 100) }}%</native:text> </native:row> <native:progress-bar :value="$progress" /></native:column>
Here $progress stands in for a public property on your component — declare public float $progress = 0.65; and update it as the work advances; the bar and the percentage label track it automatically.
Indeterminate#
Copied!
<native:progress-bar indeterminate a11y-label="Loading" />
With color override#
Copied!
<native:progress-bar :value="0.4" color="#22C55E" track-color="#DCFCE7" />
Element#
Copied!
use Nativephp\NativeUi\Elements\ProgressBar; ProgressBar::make()->value(0.65); ProgressBar::make()->indeterminate();
make()- Create a progress barvalue(float $val)- Determinate progress in[0.0, 1.0]indeterminate(bool $value = true)- Force indeterminate modecolor(string $hex)- Override the fill tinttrackColor(string $hex)- Override the track colora11yLabel(string $value)- Accessibility labela11yHint(string $value)- Accessibility hint
NativePHP
Bring your
Laravel
skills to the
desktop.
Cloud Platform
Bifrost
Build your NativePHP apps
in the cloud.
Ship it!
Plans from $10/mo
Plugin Dev Kit
Build native plugins with
Claude Code
Learn More
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More