@molecule/app-progress-bar-svelte
Feature · progress-bar · App (browser) · v1.1.4 · Apache-2.0
Svelte labeled progress bar with card wrapper
npm install @molecule/app-progress-bar-svelteHow it works
@molecule/app-progress-bar-svelte is a ready-made progress-bar feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
<script lang="ts">
import { ProgressBar, ProgressCard } from '@molecule/app-progress-bar-svelte'
</script>
<ProgressBar value={65} label="Upload progress" valueLabel="65%" color="primary" />
<ProgressCard
title="Storage used"
description="8.5 GB of 10 GB"
value={85}
valueLabel="85%"
color="warning"
/>Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte
Reference
Svelte labeled progress bar and progress-card wrapper — the Svelte
counterpart of @molecule/app-progress-bar-react, with the same props and
the same DOM.
Exports:
ProgressBar— standalone bar with optional label + value display.ProgressCard— Card-wrapped progress display (title, icon, description, bar, optional extras slot).
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
<script lang="ts">
import { ProgressBar, ProgressCard } from '@molecule/app-progress-bar-svelte'
</script>
<ProgressBar value={65} label="Upload progress" valueLabel="65%" color="primary" />
<ProgressCard
title="Storage used"
description="8.5 GB of 10 GB"
value={85}
valueLabel="85%"
color="warning"
/>
Type
feature
Installation
npm install @molecule/app-progress-bar-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
API
Interfaces
ProgressBarProps
Props accepted by the ProgressBar component.
interface ProgressBarProps {
/** Current numeric value. */
value: number
/** Maximum (defaults to 100). */
max?: number
/** Optional label rendered above the track: a snippet, or a plain string. */
label?: Snippet | string
/** Optional value display on the right of the label row: a snippet, or a plain string. */
valueLabel?: Snippet | string
/**
* Element id the track is named by (`aria-labelledby`). Wins over `label`
* and the default accessible name — `ProgressCard` points it at its title.
*/
labelledBy?: string
/** Element id the track is described by (`aria-describedby`). */
describedBy?: string
/** Size preset — maps to ClassMap `progressHeight`. */
size?: 'sm' | 'md' | 'lg'
/** Color variant — maps to ClassMap `progressColor`. */
color?: 'primary' | 'success' | 'warning' | 'error' | 'info'
/** Extra classes on the outer wrapper. */
className?: string
}
ProgressCardProps
Props accepted by the ProgressCard component.
interface ProgressCardProps {
/** Card title: a snippet, or a plain string. */
title: Snippet | string
/** Optional supporting description below the title: a snippet, or a plain string. */
description?: Snippet | string
/** Optional icon shown in the card header: a snippet, or a plain string. */
icon?: Snippet | string
/** Current value. */
value: number
/** Maximum (defaults to 100). */
max?: number
/** Value display on the right of the header (e.g. "73%"): a snippet, or a plain string. */
valueLabel?: Snippet | string
/** ProgressBar color. */
color?: 'primary' | 'success' | 'warning' | 'error' | 'info'
/** Extra classes on the Card wrapper. */
className?: string
/** Additional content rendered below the bar. */
children?: Snippet
}
Constants
ProgressBar
const ProgressBar: LegacyComponentType
ProgressCard
const ProgressCard: LegacyComponentType
Injection Notes
Requirements
Peer dependencies:
@molecule/app-svelte^3.14.0 || ^4.0.0@molecule/app-ui^1.0.1@molecule/app-ui-svelte^1.1.0svelte^5.0.0
Runtime Dependencies
@molecule/app-svelte@molecule/app-ui@molecule/app-ui-sveltesvelte
All visible text (label, valueLabel, title, description) is
pass-through — supply already-translated strings. The track's fallback
accessible name resolves through t('progressBar.label', undefined, { defaultValue: 'Progress' }) (read through useTranslation(), so it
follows a locale switch); a rendered label or a labelledBy id names it
instead. Requires a wired ClassMap bond: the track/fill styles come from the
progress* ClassMap tokens, so colors follow the active theme. Node props
are snippets, or plain strings.
Translations
Translation strings are provided by @molecule/app-locales-progress-bar.