Skip to content

Linear Progress API Reference

Props

PropTypeDefaultDescription
absoluteBooleanfalsePositions the bar absolutely at the top of its container.
variantString'default'Applies a themed style (e.g. default, success).
heightNumber4Height of the track in pixels.
indeterminateBooleanfalseShows the looping loading animation instead of a percentage width.
modelValueNumber0Current value used to calculate the filled width (use with v-model).
maxNumber100Maximum value used to derive the percentage width.
roundedBooleanfalseRounds both the track and the indicator for pill-shaped bars.

Events

The component doesn't emit any events.

Slots

The component doesn't provide any slots.

Methods

The component doesn't expose any methods via template refs.

Example Usage

Basic Usage

vue
<template>
  <OLinearProgress v-model="progress" />
</template>

<script setup>
import { ref } from "vue";
import { OLinearProgress } from "your-component-library";

const progress = ref(75);
</script>

Indeterminate Loading

vue
<template>
  <OLinearProgress indeterminate variant="success" />
</template>

<script setup>
import { OLinearProgress } from "your-component-library";
</script>

Custom Height & Rounded Track

vue
<template>
  <OLinearProgress
    v-model="progress"
    :height="8"
    rounded
  />
</template>

<script setup>
import { ref } from "vue";
import { OLinearProgress } from "your-component-library";

const progress = ref(60);
</script>

With Custom Max Value

vue
<template>
  <OLinearProgress v-model="progress" :max="200" variant="success" />
</template>

<script setup>
import { ref } from "vue";
import { OLinearProgress } from "your-component-library";

const progress = ref(150);
</script>

Absolute Positioning

vue
<template>
  <div class="container">
    <OLinearProgress v-model="progress" absolute />
    <!-- Other content -->
  </div>
</template>

<script setup>
import { ref } from "vue";
import { OLinearProgress } from "your-component-library";

const progress = ref(75);
</script>

<style>
.container {
  position: relative;
  min-height: 100px;
}
</style>