Skip to content

Objects and Properties

The documentation of PixelStack’s objects and their properties.


Rectangle

To render a rectangle (or a square), can also have rounded corners.

Top

top
The top position of the object
Usage example
my-rectangle . top = 100

Left

left
The left position of the object
Usage example
my-rectangle . left = 100

Width

width
The width of the object
Usage example
my-rectangle . width = 100

Height

height
The height of the object
Usage example
my-rectangle . height = 100

Corner Radius

cornerRadius
The corner radius of the object
Usage example
my-rectangle . cornerRadius = 16

Fill

fill
The fill color of the object
Usage example
my-rectangle . fill = #0000FF

Gradient Angle

gradientAngle
Usage example
my-rectangle . gradientAngle

Gradient Color Stops

gradientColorStops
Usage example
my-rectangle . gradientColorStops

Stroke Color

strokeColor
The stroke color of the object
Usage example
my-rectangle . strokeColor = #0000FF

Stroke Width

strokeWidth
The stroke width of the object
Usage example
my-rectangle . strokeWidth = 2

Ellipse

To render ellipse (or a circle).

Top

top
The top position of the object
Usage example
my-ellipse . top = 100

Left

left
The left position of the object
Usage example
my-ellipse . left = 100

Width

width
The width of the object
Usage example
my-ellipse . width = 100

Height

height
The height of the object
Usage example
my-ellipse . height = 100

Fill

fill
The fill color of the object
Usage example
my-ellipse . fill = #0000FF

Gradient Angle

gradientAngle
Usage example
my-ellipse . gradientAngle

Gradient Color Stops

gradientColorStops
Usage example
my-ellipse . gradientColorStops

Stroke Color

strokeColor
The stroke color of the object
Usage example
my-ellipse . strokeColor = #0000FF

Stroke Width

strokeWidth
The stroke width of the object
Usage example
my-ellipse . strokeWidth = 2

Text

To render static or dynamic text.

Top

top
The top position of the object
Usage example
my-text . top = 100

Left

left
The left position of the object
Usage example
my-text . left = 100

Text

text
The text to show in the object
Usage example
my-text . text = Hello World

Fill

fill
The fill color of the object
Usage example
my-text . fill = #0000FF

Font Family

fontFamily
Usage example
my-text . fontFamily = Playfair Display

Font Size

fontSize
The font size of the text
Usage example
my-text . fontSize = 32

Text Align

textAlign
The horizontal alignment of the text
Usage example
my-text . textAlign = center

Underline

underline
If the text should be underlined
Usage example
my-text . underline = true

Linethrough

linethrough
If the text should be struck-through
Usage example
my-text . linethrough = true

Overline

overline
If the text should be over-lined
Usage example
my-text . overline = true

Image

To render an image via URl, or via an integration.

Top

top
The top position of the object
Usage example
my-image . top = 100

Left

left
The left position of the object
Usage example
my-image . left = 100

Width

width
The width of the object
Usage example
my-image . width = 100

Height

height
The height of the object
Usage example
my-image . height = 100

Source

src
The source URL of the image
Usage example
my-image . src = https://picsum.photos/id/150/512/512

Stroke Color

strokeColor
The stroke color of the object
Usage example
my-image . strokeColor = #0000FF

Stroke Width

strokeWidth
The stroke width of the object
Usage example
my-image . strokeWidth = 2

Chart

To render a chart to visualize data. Supports most common charts, such as bar chart, pie chart, etc.

Top

top
The top position of the object
Usage example
my-chart . top = 100

Left

left
The left position of the object
Usage example
my-chart . left = 100

Width

width
The width of the object
Usage example
my-chart . width = 100

Height

height
The height of the object
Usage example
my-chart . height = 100

Chart Type

chartType
The type of the chart
Usage example
my-chart . chartType = pie

Chart Data

chartData
The data of the chart. This should be valid Chart.js data
Usage example
my-chart . chartData = {}

View

The view/artboard where your design is rendered. PixelStack only supports one view per design at the moment. You do not need to specify the ID of the view when overriding its property values.

Width

width
The width of the object
Usage example
width = 100

Height

height
The height of the object
Usage example
height = 100

Fill

fill
The fill color of the object
Usage example
fill = #0000FF