Skip to main content

Function: Frame()

Call Signature​

Frame(path: PathFunction, options?: object): FrameElement

Clips media or DOM child elements to an SVG path geometry contour.

Parameters​

ParameterTypeDescription
pathPathFunction-
options?{ align?: Align; background?: string; blur?: number; borderColor?: string; brightness?: number; children?: ElementChild; className?: string; color?: string; customPositioned?: boolean; enterDelay?: number; enterDuration?: number; exitDelay?: number; exitDuration?: number; height?: Size; highlighted?: boolean; id?: string; onActivate?: () => void; onDeactivate?: () => void; onMount?: () => void; onUnmount?: () => void; opacity?: number; origin?: ElementAnchor; position?: Position; rotation?: number; scale?: number; size?: Size; strokeWidth?: number; style?: Properties<0 | string & object, string & object>; theme?: Partial<ThemeConfig>; width?: Size; x?: PositionCoord; y?: PositionCoord; }-
options.align?Align-
options.background?stringOptional background fill color.
options.blur?numberBlur in virtual pixels (default: 0).
options.borderColor?stringOptional border outline color.
options.brightness?numberBrightness multiplier (default: 1).
options.children?ElementChildOptional child elements or media node.
options.className?string-
options.color?stringForeground CSS color (default: component/theme color).
options.customPositioned?booleanWhether this element manages its own CSS transform / positioning (disables stage translate3d).
options.enterDelay?numberDelay in seconds before entering scene transition begins.
options.enterDuration?numberDuration in seconds for entering scene transition.
options.exitDelay?numberDelay in seconds before exiting scene transition begins.
options.exitDuration?numberDuration in seconds for exiting scene transition.
options.height?SizeHeight in stage units or CSS length (default: content size).
options.highlighted?booleanGlowing outline highlight (default: false).
options.id?string-
options.onActivate?() => void-
options.onDeactivate?() => void-
options.onMount?() => void-
options.onUnmount?() => void-
options.opacity?numberWhole-element opacity from 0 to 1 (default: 1).
options.origin?ElementAnchorWhich point of the element sits on its coordinate (default: "top-left").
options.position?Position-
options.rotation?numberRotation in degrees (default: 0).
options.scale?numberScale multiplier (default: 1).
options.size?SizeBoth dimensions in stage units or CSS length (default: unset).
options.strokeWidth?numberBorder stroke outline width in virtual canvas pixels (default: 2 with borderColor, otherwise 0; highlighted minimum: 2).
options.style?Properties<0 | string & object, string & object>-
options.theme?Partial<ThemeConfig>-
options.width?SizeWidth in stage units or CSS length (default: content size).
options.x?PositionCoordHorizontal position in stage units (default: 0).
options.y?PositionCoordVertical position in stage units (default: 0).

Returns​

FrameElement

Call Signature​

Frame(path: PathFunction, children: ElementChild, options?: object): FrameElement

Clips media or DOM child elements to an SVG path geometry contour.

Parameters​

ParameterTypeDescription
pathPathFunction-
childrenElementChild-
options?{ align?: Align; background?: string; blur?: number; borderColor?: string; brightness?: number; children?: ElementChild; className?: string; color?: string; customPositioned?: boolean; enterDelay?: number; enterDuration?: number; exitDelay?: number; exitDuration?: number; height?: Size; highlighted?: boolean; id?: string; onActivate?: () => void; onDeactivate?: () => void; onMount?: () => void; onUnmount?: () => void; opacity?: number; origin?: ElementAnchor; position?: Position; rotation?: number; scale?: number; size?: Size; strokeWidth?: number; style?: Properties<0 | string & object, string & object>; theme?: Partial<ThemeConfig>; width?: Size; x?: PositionCoord; y?: PositionCoord; }-
options.align?Align-
options.background?stringOptional background fill color.
options.blur?numberBlur in virtual pixels (default: 0).
options.borderColor?stringOptional border outline color.
options.brightness?numberBrightness multiplier (default: 1).
options.children?ElementChildOptional child elements or media node.
options.className?string-
options.color?stringForeground CSS color (default: component/theme color).
options.customPositioned?booleanWhether this element manages its own CSS transform / positioning (disables stage translate3d).
options.enterDelay?numberDelay in seconds before entering scene transition begins.
options.enterDuration?numberDuration in seconds for entering scene transition.
options.exitDelay?numberDelay in seconds before exiting scene transition begins.
options.exitDuration?numberDuration in seconds for exiting scene transition.
options.height?SizeHeight in stage units or CSS length (default: content size).
options.highlighted?booleanGlowing outline highlight (default: false).
options.id?string-
options.onActivate?() => void-
options.onDeactivate?() => void-
options.onMount?() => void-
options.onUnmount?() => void-
options.opacity?numberWhole-element opacity from 0 to 1 (default: 1).
options.origin?ElementAnchorWhich point of the element sits on its coordinate (default: "top-left").
options.position?Position-
options.rotation?numberRotation in degrees (default: 0).
options.scale?numberScale multiplier (default: 1).
options.size?SizeBoth dimensions in stage units or CSS length (default: unset).
options.strokeWidth?numberBorder stroke outline width in virtual canvas pixels (default: 2 with borderColor, otherwise 0; highlighted minimum: 2).
options.style?Properties<0 | string & object, string & object>-
options.theme?Partial<ThemeConfig>-
options.width?SizeWidth in stage units or CSS length (default: content size).
options.x?PositionCoordHorizontal position in stage units (default: 0).
options.y?PositionCoordVertical position in stage units (default: 0).

Returns​

FrameElement