Apply visual enhancements to any layer via the
frame attribute.
Attributes
| Attribute | Description | Default |
|---|---|---|
backColor | Background color | none |
backOpacity | Background opacity (e.g. '80%') | '100%' |
frameColor | Border color | none |
frameSize | Border width (px or % of the smaller side) | '6%' |
shape | 'square', 'round' or 'snip' corners | 'square' |
rx, ry | Corner size when the shape is not square (px or %); ry defaults to rx | '20%' |
corners | Array of corners to modify | all four |
clip | 'none', 'auto' or 'force': clip content at the corners | 'auto' |
padding | Content padding (px or %) | 0 |
shadow | Enable shadow | false |
shadowColor | Shadow color | '#A0A0A0' |
shadowSize | Shadow size (px or %) | '3%' |
Text with Background
$.textArea({
fontSize: 40,
frame: {
backColor: 'white', backOpacity: '80%',
frameColor: 'black', frameSize: 2,
shape: 'round', rx: 8, padding: 10
}
}).text("Breaking News").addTo('svg');Image with Shadow
$.image({
href: 'logo.png', width: 300, height: 300,
frame: {
shadow: true, shadowColor: '#808080',
shadowSize: 8
}
}).addTo('svg');Related Pages
- Layers Overview — all layers support
frame - Text Layers — frame for text backgrounds
- Media Layers — reflection effects
SpinetiX Wiki Reference
Frame borders, backgrounds, rounded corners, shadows, padding, soft edges, reflections.