Element property

Each property captures particular attributes or metadata related to the design system element, such as token, component or others.

Available from: 2.0.0

Import


                                                        
                                                        
                                                            import { ElementProperty } from "@supernovaio/sdk"
                                                        
                                                            

Properties

  • idInVersion: Versioned identifier of the element property which can change with different versions.
  • id: Persistent identifier for the element property which remains consistent across different versions.
  • designSystemVersionId: Identifier for the specific design system version this property belongs to.
  • name: The display name of the element property.
  • codeName: A unique, code-safe name for the property that is guaranteed to be present.
  • description: A brief explanation or overview of the element property's purpose or characteristics. Can be null if no description is provided.
  • propertyType: The base type of the property which specifies its datatype such as text, number, URL, etc.
  • targetElementType: Indicates the type of design system object this property is associated with, for instance, whether it's a token, a component, or a documentation page.
  • linkElementType: Specifies the type of design system object this property can be linked with or configured with. This could be null if there's no linkable object type.
  • options: If the property type is select, this will contain a list of available options for that select property.

 

Note that values of the specific properties are stored on their respective elements on the property called propertyValues, such as Tokens or Components.

Property Types

The ElementPropertyType enum defines the possible base types for element properties. It includes the following values:

  • text: Represents a text-based property.
  • number: Represents a numeric property.
  • boolean: Represents a boolean (true/false) property.
  • select: Represents a select property with predefined options.
  • generic: Represents a generic property.
  • link: Represents a link property.
  • url: Represents a URL property.

Property target types

The ElementPropertyTargetElementType enum defines the possible types of design system objects that an element property can be associated with. It includes the following values:

  • token: Indicates that the property is associated with a token.
  • component: Indicates that the property is associated with a component.
  • documentationPage: Indicates that the property is associated with a documentation page.

The ElementPropertyLinkElementType enum defines the possible types of design system objects that an element property can link to. It includes the following values:

  • documentationItem: Indicates that the property was linked with documentation item.
  • figmaComponent: Indicates that the property was linked with a Figma component.