MotionScript

@motion-script/core


@motion-script/core / StrokeProp

Interface: StrokeProp

Defined in: attributes/shape/stroke/mapper.ts:59

Stroke prop and resolved types, resolver, and array lerp.

Properties

align?

optional align?: StrokeAlign

Defined in: attributes/shape/stroke/mapper.ts:73

Where the stroke sits relative to the edge: a number in [-1, 1] or one of 'inside' (-1), 'center' (0), 'outside' (1). Defaults to 'inside', so the stroke stays within the shape's measured bounds (like a CSS border) rather than leaking half its width outside.


cap?

optional cap?: StrokeCap

Defined in: attributes/shape/stroke/mapper.ts:78

How the ends of an open stroke (and the ends of each dash) are shaped: 'butt' (flush, the default), 'round', or 'square'.


dash?

optional dash?: number | number[]

Defined in: attributes/shape/stroke/mapper.ts:65

Dash pattern. A single number n becomes [n, n].


dashOffset?

optional dashOffset?: number

Defined in: attributes/shape/stroke/mapper.ts:66


fill?

optional fill?: Fill

Defined in: attributes/shape/stroke/mapper.ts:63

Any loose fill: a CSS color string, fill prop object, resolved fill, or FillChain/array of layers.


join?

optional join?: StrokeJoin

Defined in: attributes/shape/stroke/mapper.ts:83

How two segments meet at a corner: 'miter' (sharp, the default), 'round', or 'bevel' (flattened).


miterLimit?

optional miterLimit?: number

Defined in: attributes/shape/stroke/mapper.ts:88

Maximum ratio of miter length to stroke width before a 'miter' join is truncated to a bevel. Only affects join: 'miter'. Defaults to 4.


weight?

optional weight?: number

Defined in: attributes/shape/stroke/mapper.ts:61

Stroke width in pixels. Defaults to 1.