bracketDashArray

Bracket
stable

Resolve SVG stroke-dasharray and stroke-linecap attributes from a CSS border-style value. Used by OrigamBracket to render dashed or dotted connector lines.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

borderStyle
required
string | null | undefined
CSS border-style value: "dashed" → dasharray "8 5", "dotted" → dasharray "1 5" + linecap "round", anything else → empty object.

API

Return value

The value returned by this util.

Object with optional dasharray and linecap values ready to spread onto an SVG <line> or <path> element.

Usage

Examples

Ready-to-paste usage snippets.

Map border-style to SVG stroke attributes

typescript