# bpsToLinkWidthMode

Canonical: https://docs.shumoku.dev/en/library/api/bpsToLinkWidthMode
Language: en

@shumoku/core · 0.4.0 · function

# bpsToLinkWidthMode

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/link-utils.ts#L153)

Map bits/sec to stroke width under the given mode. Unknown bandwidth returns 0 (caller decides the fallback), matching \`bpsToLinkWidth\`.

```
bpsToLinkWidthMode(bps: number | undefined, mode?: LinkWidthMode): number
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `bps` | `number | undefined` | No additional description. | `—` |
| `mode` | `LinkWidthMode` | No additional description. | `'log'` |

## Returns

```
number
```

[`libs/@shumoku/core/src/layout/link-utils.ts:153`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/layout/link-utils.ts#L153)
