# flagstaff/progress

> Every export of flagstaff/progress, with its signature and doc comment: progress, plus 2 types.

Source: https://flagstaff.interlace.tools/docs/api/progress

<!-- Generated by scripts/api-reference.ts from the built dist/*.d.ts. Do not edit; run `npx tsx scripts/api-reference.ts`. -->

```ts
import { progress } from 'flagstaff/progress';
```

## Functions

### progress

A progress bar: `12/30 files · 40%` off a terminal, a drawn bar on one.

```ts
function progress({ width, glyphs }?: ProgressOptions): Component<ProgressState>;
```

| Parameter | Type |
| :-- | :-- |
| `{ width, glyphs }` (optional) | `ProgressOptions` |

**Returns** `Component<ProgressState>`

## Interfaces

### ProgressOptions

```ts
interface ProgressOptions {
    /** Cells the bar occupies on a terminal. Default 24. */
    width?: number;
    /** The two characters the bar is drawn with. Default `█` and `░`. */
    glyphs?: {
        filled: string;
        empty: string;
    };
}
```

### ProgressState

```ts
interface ProgressState {
    /** Units done so far; clamped into `[0, total]` on the way out. */
    done: number;
    total: number;
    /** What is being counted, e.g. `files`. Read in both projections. */
    label?: string;
}
```
