Search
Search
Traits
Traits
Traits
Allow to get or edit node.
Traits represent the various properties and behaviors that can be applied to nodes in Framer. Each node type supports a specific set of traits that define its appearance, layout, and behavior.
Null Values
Setting a trait to null
generally removes or resets that property:
backgroundColor: null
- Removes the background colorlayout: null
- Disables any applied layout (stack or grid)borderRadius: null
- Removes border radiusborder: null
- Disables the border
CSS Dimensions
Many traits use CSS dimension values with specific units:
px
- Pixels (e.g.,"100px"
)%
- Percentage (e.g.,"50%"
)fr
- Fraction (for grid/stack layouts, e.g.,"1fr"
)vh
- Viewport height (e.g.,"100vh"
)
Node Type Support Matrix
Trait | FrameNode | TextNode | SVGNode | ComponentInstanceNode | ComponentNode | WebPageNode | VectorSetNode | VectorSetItemNode |
---|---|---|---|---|---|---|---|---|
Basic Properties | ||||||||
name | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ |
visible | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
locked | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
Visual Properties | ||||||||
backgroundColor | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
backgroundImage | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
backgroundGradient | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
opacity | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
rotation | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
borderRadius | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
border | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
imageRendering | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Position & Layout | ||||||||
position | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
top/right/bottom/left | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
centerX/centerY | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
width/height | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
Size Constraints | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
aspectRatio | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
Layout System | ||||||||
layout | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
gap | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
padding | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Stack Properties | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Grid Properties | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Grid Item Properties | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Type-Specific | ||||||||
svg | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
font | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
inlineTextStyle | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
link | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
linkOpenInNewTab | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
controls | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
Component Properties | ||||||||
componentIdentifier | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
componentName | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
isVariant | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
isBreakpoint | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Web Page | ||||||||
path | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ |
collectionId | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ |
Methods & Properties
Width-to-height ratio
Width-to-height ratio
Background color in RGBA format or as a ColorStyle instance
Background color in RGBA format or as a ColorStyle instance
Background gradient
Background gradient
Background image asset
Background image asset
Border properties
Border properties
Border radius for rounded corners
Border radius for rounded corners
Distance from bottom edge when using absolute/fixed positioning
Distance from bottom edge when using absolute/fixed positioning
Center anchor position as percentage
Center anchor position as percentage
Center anchor position as percentage
Center anchor position as percentage
Collection ID for the web page
Collection ID for the web page
Identifier of the component
Identifier of the component
Name of the component
Name of the component
Property control values for code components
Property control values for code components
Font selection for text
Font selection for text
Spacing between items in a layout
Spacing between items in a layout
Gesture state for component variants
Gesture state for component variants
How items are aligned within the grid
How items are aligned within the grid
Number of columns in the grid
Number of columns in the grid
Minimum width of grid columns in pixels
Minimum width of grid columns in pixels
Width of grid columns in pixels
Width of grid columns in pixels
Type of column width sizing
Type of column width sizing
Number of columns to span
Number of columns to span
Whether to fill the grid cell height
Whether to fill the grid cell height
Whether to fill the grid cell width
Whether to fill the grid cell width
Horizontal alignment within grid cell
Horizontal alignment within grid cell
Number of rows to span
Number of rows to span
Vertical alignment within grid cell
Vertical alignment within grid cell
Number of rows in the grid
Number of rows in the grid
Height of grid rows in pixels
Height of grid rows in pixels
Type of row height sizing
Type of row height sizing
Height of the node
Height of the node
How images should be rendered when scaled
How images should be rendered when scaled
ID of the node this variant inherits from
ID of the node this variant inherits from
Apply a text style preset
Apply a text style preset
Whether this is a breakpoint
Whether this is a breakpoint
Whether this is the primary breakpoint
Whether this is the primary breakpoint
Whether this is the primary variant
Whether this is the primary variant
Whether this is a component variant
Whether this is a component variant
Enables stack or grid layout
Enables stack or grid layout
Distance from left edge when using absolute/fixed positioning
Distance from left edge when using absolute/fixed positioning
URL or internal page link
URL or internal page link
Whether to open link in new tab
Whether to open link in new tab
Whether the node is locked for editing
Whether the node is locked for editing
Maximum height constraint
Maximum height constraint
Maximum width constraint
Maximum width constraint
Minimum height constraint
Minimum height constraint
Minimum width constraint
Minimum width constraint
The name of the node displayed in the layers panel
The name of the node displayed in the layers panel
Opacity of the node
Opacity of the node
Inner spacing of a container with layout
Inner spacing of a container with layout
URL path for the web page
URL path for the web page
Positioning behavior of the node
Positioning behavior of the node
Distance from right edge when using absolute/fixed positioning
Distance from right edge when using absolute/fixed positioning
Rotation angle in degrees
Rotation angle in degrees
How items are aligned perpendicular to the stack direction
How items are aligned perpendicular to the stack direction
Direction of items in a stack layout
Direction of items in a stack layout
How items are distributed in a stack layout
How items are distributed in a stack layout
Whether items should wrap to the next line
Whether items should wrap to the next line
SVG markup content
SVG markup content
Distance from top edge when using absolute/fixed positioning
Distance from top edge when using absolute/fixed positioning
Whether the node is visible on the canvas
Whether the node is visible on the canvas
Width of the node
Width of the node