# getLinkWidthForMode

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

@shumoku/core · 0.4.0 · function

# getLinkWidthForMode

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

Visual line width for a link under a width mode. Same precedence as \`getLinkWidth\` (explicit style > bandwidth > type > default). Because a core \`Link\` is one physical link, this IS the per-strand width — a LAG renders as N parallel links each at its own width, never as one merged stroke (v3 "railway discipline": no two services share a drawn line).

```
getLinkWidthForMode(link: Link, mode?: LinkWidthMode): number
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `link` | `Link` | No additional description. | `—` |
| `mode` | `LinkWidthMode` | No additional description. | `'log'` |

## Returns

```
number
```

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