Semantic-Org/Semantic-UI · warning
Value specified is below 0%
Error message
Value specified is below 0%
What it means
Companion to [97]. In set.barWidth() (progress.js:405-407), if value < 0 the module logs error.tooLow and skips setting the width. Percentages below zero are invalid for the bar-width setter.
Source
Thrown at src/definitions/modules/progress.js:893
value : false,
// delay in ms for fail safe animation callback
failSafeDelay : 100,
onLabelUpdate : function(state, text, value, total){
return text;
},
onChange : function(percent, value, total){},
onSuccess : function(total){},
onActive : function(value, total){},
onError : function(value, total){},
onWarning : function(value, total){},
error : {
method : 'The method you called is not defined.',
nonNumeric : 'Progress value is non numeric',
tooHigh : 'Value specified is above 100%',
tooLow : 'Value specified is below 0%'
},
regExp: {
variable: /\{\$*[A-z0-9]+\}/g
},
metadata: {
percent : 'percent',
total : 'total',
value : 'value'
},
selector : {
bar : '> .bar',
label : '> .label',
progress : '.bar > .progress'
},
View on GitHub (pinned to 597843ab84)
Solutions
- Pass a non-negative percent to 'set bar width'.
- Clamp with Math.max(0, value) before the call.
- Use 'decrement'/'set progress' which normalize internally instead of feeding raw negatives.
Example fix
// before
$('.ui.progress').progress('set bar width', delta); // delta = -10 -> [98]
// after
$('.ui.progress').progress('set bar width', Math.max(0, delta)); Defensive patterns
Strategy: validation
Validate before calling
var pct = Math.max(0, Math.min(100, Number(value)));
if (Number(value) < 0) console.warn('barWidth clamped from', value);
$('.ui.progress').progress('set bar width', pct); Prevention
- Pass only non-negative percents to 'set bar width'.
- Clamp deltas with Math.max(0, x).
- Use 'decrement' which normalizes instead of raw negatives.
When it happens
Trigger: Calling $('.progress').progress('set bar width', -10) or passing a negative number (e.g. from an overshooting decrement or a signed computation) to the barWidth setter.
Common situations: Decrement logic producing negatives; signed deltas; subtracting a larger from a smaller value without clamping; feeding raw sensor/counter differences that can be negative.
Related errors
- Value specified is above 100%
- The method you called is not defined.
- Progress value is non numeric
- {name} must be an integer
- There were no elements that matched the specified selector
AI-assisted analysis of Semantic-Org/Semantic-UI@597843ab84 (2026-08-13).
Data as JSON: /api/errors/c423ad0670a7bc35.
Report an issue: GitHub.