Component Properties Playground
Component Properties Playground
properties
This playground is designed to help you
get started with component properties.
Start ->
Contents
-> What are component properties? Choose your own
-> Create and use a text property adventure or press
-> Create and use a boolean property the N key to navigate
-> Create and use the instance swap property to the next frame.
(Shift + N to navigate backwards)
-> Expose nested instances
-> Additional things to note
-> More examples
-> Additional resources
What are
component
properties?
This playground is designed to help you
get started with component properties.
What are Button Button Button
component
properties?
Component properties assign
Button Checkout Button
names and values to elements
that can to be customized in a
component, such as: an instance
that can be swapped, a text layer Button Button
that can be updated, or a
element’s visibility that can
be toggled on/off.
Boolean property
Text property
Swap instance property
toggles layer visibility overrides text from design panel instance swap from design panel
What are the main benefits
Reduction in manually-created
variant
Easier discovery of which parts
of a component can be
customize
Closer alignment between Button
design and code-- your
developers will love you!
We can combine all three properties
For example:
<button iconBefore="bell">
can now be represented with a
button using an instance swap
property called "iconBefore" set to
bell. This alignment makes it easier Button label
to update and maintain consistency Warning!
between your design sytem and
codebase. Hi, I’m a modal with a title prop.
OK
Text property
Learn how to create and use text
properties
Create a text
property Select the text layer
Click me
If you have text layers in a
component that are intended to be
customized, you can create a text
property that will surface in the
1 Select the “Click me” text layer. In 2 Give it the name “Label”. You can
design panel.
the properties panel, in the new also set it’s default value. It will
This will allow you to content section, click on the default to whatever text is currently
property icon to create an new text in the text box.
Create a text property with a
property.
named value like code
components often have,
ex: label=”Click me
Update text in components
Apply text property
without diving into sublayers
Edit a text
property from
property.
design panel.
Batch editing a
text property
You can select multiple objects and
override text at once. This should
speed up your workflow.
Click me Click me
Book excursion
Using a boolean
property
Let’s try using the new “Image” Select me
boolean property that you created.
Book excursion
Instance swap
property
Learn how to create and use instance
swap properties
Create an Double click to select the icon
instance swap
property Message title
Icons
Beta
Create a list of
preferred values Select me
You can also define a list of Message title
3 To edit preferred values for existing 4 Click on the plus button next to
Go here to learn how to opt-in to instance swap properties, click on Preferred values and check which
the open beta. the “edit properties” icon next to instances you want to appear as a
the desired property to access its prefered value.
settings and preferred values.
Icons
Edit property
Use instance
swap property
1 Select the notification
instance by clicking on it.
Button
Beta
Customize
nested instance
properties Select me
Button
Go to component configuration
Beta
Simplify
instances
Simplify all component instances to
reduce the complexity of the design
panel and focus user attention on
what can be changed using
component properties.
For example:
Button Button
a combination of features.
Subline
switch on/off online and read Hey! Do you want to grab some dinner later?
statu
Select Task card instance and play with the different properties
Help Center
Component
All about component
properties
properties
Read the article
resources
Office Hours
More resources to help you use
component properties and streamline your Learn more best practices
design systems and tips
Watch the recording