主题设置

选择强调色与基础色,保存后全站生效。

强调色
基础色
点击切换锁定状态
显示侧边栏
隐藏侧边栏

进度条

一个简单的进度条,用于指示完成度或加载状态。

<flux:progress value="75" />

最大值

使用 max 属性为非百分比比例设置自定义最大值。

<flux:progress value="3" max="7" />

颜色

使用 color 属性覆盖默认强调色。

<flux:progress value="75" color="purple" />

高度

使用 class 属性自定义进度条的高度。

<flux:progress value="75" class="h-3" />

带标签

将进度条包裹在 flux:field 中以添加标签和描述。若不显示可见标签,请在标签上使用 sr-only 以支持屏幕阅读器。

上传进度
正在上传 7 个文件中的 3 个...
<flux:field>    <flux:label>Upload progress</flux:label>    <flux:progress value="42" color="blue" />    <flux:description>Uploading 3 of 7 files...</flux:description></flux:field>

显示当前值

在标签中或进度条旁边内联显示当前值。

存储空间
75%
存储空间
75%
<flux:field>    <flux:label>        Storage        <x-slot name="trailing">            <span class="tabular-nums">75%</span>        </x-slot>    </flux:label>    <flux:progress value="75" /></flux:field><flux:field>    <flux:label>Storage</flux:label>    <div class="flex items-center gap-4 -mt-2">        <flux:progress value="75" />        <span class="text-sm tabular-nums ...">75%</span>    </div></flux:field>

受控

使用 wire:model 将进度值绑定到属性,从而动态控制它。

<flux:slider wire:model="progress" /><flux:progress wire:model="progress" />

参考

flux:progress

属性
描述
value
当前进度值(0 到 max)。默认值:0
max
最大值。默认值:100
color
进度条填充颜色(例如 blueredgreen)。默认值:强调色。
CSS 变量
描述
--flux-progress
以原始数字形式表示的计算进度(0-100)。
--flux-progress-percentage
以百分比字符串形式表示的计算进度(例如 75%)。在内部用于设置进度条宽度。
© 2025 FluxProMax™. All Rights Reserved.

备案号:皖ICP备13019729号-11

网站导航