--- title: "getStyleVar (Reading a style property)" slug: "calc-function-get-style-var" updated: 2026-05-12T12:46:59Z published: 2026-05-12T12:46:59Z canonical: "docs.lobstersoftware.com/calc-function-get-style-var" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # getStyleVar (Reading a style property) > [!NOTE] > Returns the value of any style property. Style properties can be listed and customized in the [Styles](/v1/docs/en/core-style) module. > > > [!TIP] > > Tooltip > > > > Syntax: *$getStyleVar(varName[,defaultValue])* > > > > | Parameter | Description | > > | --- | --- | > > | `varName` | The name of the style property (e.g. primaryColor). | > > | `defaultValue` `(optional)` | The value returned if the specified style property does not exist or returns an undefined value. | > > > > Returns the value of the style property with the name "varName" (parameter). > > > > Example: $getStyleVar(primaryColor) – delivers #980f45 ## Syntax *$getStyleVar(varName[,defaultValue])* ## Parameter | Name | Description | | --- | --- | | varName | The name of the style property (e.g. primaryColor). | | defaultValue (optional) | The value returned if the specified style property does not exist or returns an undefined value. | ## Return value The value of the style property named "varName" (parameter). ## Example | Syntax | Result | | --- | --- | | $getStyleVar(primaryColor) | #980f45 | | $getStyleVar(buttonBorderRadius) | 5px |