Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront Development
Concepts

Properties

Learn what properties (props) are in VTEX IO, how they work, and the data types you can use to customize blocks in the Store Framework.

A property is defined by a JSON (JavaScript Object Notation) object. A JSON object consists of a set of key-value pairs enclosed in curly braces ({}). Each key paired with its corresponding value forms a property, which represents a characteristic of that object. Consider the following JSON object:


_10
{
_10
"name": "Pedro",
_10
"height": 1.90
_10
}

In this example, name and height are the property keys, and "Pedro" and 1.90 are their respective values.

The key and value can also be called property name and property value, respectively.

Properties in React and Store Framework

In the context of VTEX IO, properties (commonly referred to as props) are used to configure the behavior and appearance of blocks within the Store Framework. The props configured for a block in a Store Theme determine how the component is rendered in the user interface. The more props a block supports, the more flexible and customizable it becomes.

Property types

The value of a property can be one of several data types. The following table describes the most common types used for block properties in VTEX IO.

TypeValue FormatExample
stringA text value enclosed in double quotes ("")."Hello, World!"
numberAn integer or a floating-point number. Do not use quotes.10 or 23.45
booleanA logical value, which must be either true or false. Do not use quotes.true
objectA collection of key-value pairs enclosed in curly braces ({}).{ "fontSize": 16, "fontWeight": "bold" }
arrayAn ordered list of values of the same data type, enclosed in square brackets ([]).["image1.jpg", "image2.jpg"]
enumA value from a predefined list of options, enclosed in double quotes ("")."horizontal" or "vertical"
blockThe name of another block to be rendered, enabling component composition."icon-cart#header" (from the Store Icons app)
Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page