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
The angle of the gradient
Usage example
my-rectangle . gradientAngle

Gradient Color Stops

gradientColorStops
The color stops of the gradient
Usage example
my-rectangle . gradientColorStops = #0000FF, #000000

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

Opacity

opacity
The opacity of the object (0 = transparent, 1 = fully opaque)
Usage example
my-rectangle . opacity = 0.5

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
The angle of the gradient
Usage example
my-ellipse . gradientAngle

Gradient Color Stops

gradientColorStops
The color stops of the gradient
Usage example
my-ellipse . gradientColorStops = #0000FF, #000000

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

Opacity

opacity
The opacity of the object (0 = transparent, 1 = fully opaque)
Usage example
my-ellipse . opacity = 0.5

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

Width

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

Height

height
The height of the object
Usage example
my-text . height = 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

Auto Fit

autoFit
If the text should be auto-fitted to the height of the object
Usage example
my-text . autoFit = true

Min Font Size

minFontSize
The minimum font size of the text
Usage example
my-text . minFontSize = 12

Max Font Size

maxFontSize
The maximum font size of the text
Usage example
my-text . maxFontSize = 72

Text Align

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

Font Weight

fontWeight
The font weight of the text. The supported font weights depend on the selected font
Usage example
my-text . fontWeight = 700

Italic

italic
If the text should be in italic style
Usage example
my-text . italic = true

Vertical Align

verticalAlign
The vertical alignment of the text
Usage example
my-text . verticalAlign = middle

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

Opacity

opacity
The opacity of the object (0 = transparent, 1 = fully opaque)
Usage example
my-text . opacity = 0.5

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

Image Fit

imageFit
How the image should fit within its bounds (cover, contain, or fill)
Usage example
my-image . imageFit = cover

Corner Radius

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

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

Opacity

opacity
The opacity of the object (0 = transparent, 1 = fully opaque)
Usage example
my-image . opacity = 0.5

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 = {}

Opacity

opacity
The opacity of the object (0 = transparent, 1 = fully opaque)
Usage example
my-chart . opacity = 0.5

Table

To render a data table. Supports JSON and CSV data formats.

Top

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

Left

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

Width

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

Height

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

Fill

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

Opacity

opacity
The opacity of the object (0 = transparent, 1 = fully opaque)
Usage example
my-table . opacity = 0.5

Data

tableData
The table data as a JSON array of objects or CSV string. Each object represents a row, with keys as column names.
Usage example
my-table . tableData = [{"name": "Alice", "score": 95}, {"name": "Bob", "score": 87}]

Show Header

showHeader
Whether to show the table header row
Usage example
my-table . showHeader = true

Header Font Size

headerFontSize
The font size of the table header text
Usage example
my-table . headerFontSize = 16

Header Font

headerFontFamily
The font family of the table header text
Usage example
my-table . headerFontFamily = Noto Sans

Header Weight

headerFontWeight
The font weight of the table header text (400, 500, 600, 700)
Usage example
my-table . headerFontWeight = 700

Header Color

headerColor
The text color of the table header
Usage example
my-table . headerColor = #000000

Body Font Size

bodyFontSize
The font size of the table body text
Usage example
my-table . bodyFontSize = 14

Body Font

bodyFontFamily
The font family of the table body text
Usage example
my-table . bodyFontFamily = Noto Sans

Body Weight

bodyFontWeight
The font weight of the table body text (400, 500, 600, 700)
Usage example
my-table . bodyFontWeight = 400

Body Color

bodyColor
The text color of the table body
Usage example
my-table . bodyColor = #333333

Border Style

borderStyle
The border style of the table (none, horizontal, grid, outline)
Usage example
my-table . borderStyle = grid

Border Color

borderColor
The border color of the table
Usage example
my-table . borderColor = #E5E7EB

Border Width

borderWidth
The border width of the table in pixels
Usage example
my-table . borderWidth = 1

Alternate Row Fill

alternateRowFill
The background color for alternate (even) rows
Usage example
my-table . alternateRowFill = #F9FAFB

Cell Padding X

cellPaddingX
The horizontal padding inside each table cell in pixels
Usage example
my-table . cellPaddingX = 12

Cell Padding Y

cellPaddingY
The vertical padding inside each table cell in pixels
Usage example
my-table . cellPaddingY = 8

Row Gap

rowGap
The gap between table rows in pixels
Usage example
my-table . rowGap = 2

Max Rows

maxRows
The maximum number of rows to display. Extra rows show an overflow message.
Usage example
my-table . maxRows = 10

Empty Message

emptyMessage
The message shown when the table has no data
Usage example
my-table . emptyMessage = No data available

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