Installation

Barrel

import { Meter } from 'kumo-svelte';

Granular

import { Meter } from 'kumo-svelte/components/meter';

Usage

<script lang="ts">  import { Meter } from 'kumo-svelte';</script><Meter label="Storage used" value={65} />

Examples

Basic Meter

The default meter displays a label and percentage value.

Custom Value Display

Use customValue to show a custom string instead of the percentage.

Hidden Value

Set showValue={false} to hide the value display.

Full Meter

A meter at 100% capacity.

Low Value

A meter with a low value.

API Reference

PropTypeDefaultDescription
customValue string-Custom value label.
label *string-Visible label content.
showValue booleantrueShows the current value.
trackClassName string-Class for the meter track.
indicatorClassName string-Class for the meter indicator.
value number0Controlled value.
max number100Maximum value.
min number0Minimum value.
class string-Additional classes merged onto the root element.