# Cheat Sheet

Here is a list of all the currently available <code class="expression">space.vars.Company</code> attributes. The “Compatible with” section indicates whether an attribute can be used on the same element alongside others. However, be aware that using multiple attributes on the same element might cause one to override the other.

<table data-full-width="true"><thead><tr><th width="256.796875" valign="top">Attribute name</th><th width="227.2265625" valign="top">Compatible with</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>li-object</code></td><td valign="top"><code>li-attribute</code>, <code>li-object</code></td><td valign="top">To insert a <a href="https://shopify.dev/docs/api/liquid/objects">Shopify object</a>, use <code>li-object="product.title"</code>. This will render as <code>{{ product.title }}</code> within the attached element. You can also use a modifier to specify its position, such as <code>li-object:class="product.title"</code>, which will render as <code>class="{{ product.title }}"</code>. <a href="../liquid-attributes/objects">Learn more.</a></td></tr><tr><td valign="top"><code>li-attribute</code></td><td valign="top"><code>li-object</code>, <code>li-attribute</code></td><td valign="top">This tag allows us to use reserved attributes like class or src on every element. This is an example on how to use it: <code>li-attribute:class = "{% if product.available %} tex-color-green {% endif %}"</code> will be converted into <code>class = "{% if product.available %} tex-color-green {% endif %}"</code>. <a href="../../liquid-attributes/miscellaneous#li-attribute">Learn more</a>.</td></tr><tr><td valign="top"><code>li-js-object</code></td><td valign="top"><code>li-js-object</code></td><td valign="top">This attribute generates an <a href="https://alpinejs.dev/start-here">Alpine.js</a> object (<a href="https://alpinejs.dev/directives/bind">x-bind</a> or <a href="https://alpinejs.dev/directives/text">x-text</a>) to dynamically display data without requiring a page reload, making it ideal for use in components like the mini cart or variant container. You can use modifiers to describe the position, like <code>li-object</code>. <a href="../../add-ons/liquiflow-elements#li-object-vs-li-js-object">Learn more</a>.</td></tr><tr><td valign="top"><code>li-settings</code></td><td valign="top"><code>li-settings</code></td><td valign="top">You can implement <a href="https://shopify.dev/docs/storefronts/themes/architecture/settings/input-settings">settings</a> that allow your <a href="https://shopify.dev/docs/storefronts/themes/architecture/settings/input-settings">Shopify content editor</a> to modify both the content and appearance directly within Shopify. To achieve this, we've introduced the <code>li-settings</code> tag. For example, <code>li-settings:text</code> to provide a text input. <a href="../section-settings/settings">Learn more</a>.</td></tr><tr><td valign="top"><code>li-for</code></td><td valign="top">-</td><td valign="top">When you need to <a href="https://shopify.dev/docs/api/liquid/tags/for">iterate over an array</a>, such as a list of products or product tags, you can employ the <code>li-for</code> tag. This tag will duplicate the attached element. Within a loop, you have access to the object you're iterating through. For example, <code>li-for="product in collection.products"</code>. <a href="../liquid-attributes/iteration-lists">Learn more</a>.</td></tr><tr><td valign="top"><code>li-paginate</code></td><td valign="top">-</td><td valign="top">When using a forloop with <code>li-for</code>, you can manage <a href="https://shopify.dev/docs/api/liquid/tags/paginate">pagination</a> using the <code>li-paginate</code> tag. Inside the <code>li-paginate</code> tag, you’ll have access to the <a href="https://shopify.dev/docs/api/liquid/objects/paginate">pagination object</a>. This is useful, for example, on collection pages. By default, only <code>50</code> products are rendered, but with <code>li-paginate</code>, you can override this limit. <a href="../../liquid-attributes/miscellaneous#li-paginate">Learn more.</a></td></tr><tr><td valign="top"><code>li-if</code></td><td valign="top">-</td><td valign="top">This <a href="https://shopify.dev/docs/api/liquid/tags/if">tag</a> toggles the visibility of the attached element based on a specified condition. For example, <code>li-if="product.available"</code> generates a conditional wrapping tag: <code>{% if product.available %} &#x3C;div>Product is available&#x3C;/div> {% endif %}</code><em>.</em> <a href="../../liquid-attributes/conditional#if">Learn more</a>.</td></tr><tr><td valign="top"><code>li-unless</code></td><td valign="top">-</td><td valign="top">This <a href="https://shopify.dev/docs/api/liquid/tags/unless">tag</a> functions similarly to <code>li-if</code> but displays the element when the specified condition is false. <a href="../../liquid-attributes/conditional#unless">Learn more</a>.</td></tr><tr><td valign="top"><code>li-when</code></td><td valign="top">-</td><td valign="top"><p>When you want to display an element which should meet different conditions, you can wrap these elements with the <code>li-case</code> <a href="https://shopify.dev/docs/api/liquid/tags/case">tag</a>. Inside the wrapper, you put the elements with different <code>li-when</code> <a href="https://shopify.dev/docs/api/liquid/tags/case">tags</a>. <a href="../../liquid-attributes/conditional#case">Learn more.</a></p><p><br></p></td></tr><tr><td valign="top"><code>li-js-if</code></td><td valign="top">-</td><td valign="top">This attribute generates an <a href="https://alpinejs.dev/start-here">Alpine.js</a> <code>&#x3C;template></code> with <a href="https://alpinejs.dev/directives/if"><code>x-if</code></a> applied, allowing you to dynamically hide or show elements based on various criteria without reloading the page. It is particularly useful in components like the mini cart or product variant container. <a href="../../add-ons/liquiflow-elements#li-js-if">Learn more</a>.</td></tr><tr><td valign="top"><code>li-section</code></td><td valign="top">-</td><td valign="top">This attribute creates a <a href="https://shopify.dev/docs/storefronts/themes/architecture/sections">Shopify section file</a> containing all the HTML within the element. These sections can later be rearranged in the Shopify editor, and with <code>li-settings</code>, their content can be made editable. <a href="https://www.liquify.pro/docu/getting-started#sections">Learn more</a>.</td></tr><tr><td valign="top"><code>li-section-group</code></td><td valign="top">-</td><td valign="top">This attribute creates a <a href="https://shopify.dev/docs/storefronts/themes/architecture/section-groups">Shopify group section file</a> containing all the sections as json. Th's can be used to create dynamic header or footer groups in the Shopify Theme editor. <a href="../../section-settings/sections#section-groups">Learn more</a>.</td></tr><tr><td valign="top"><code>li-block</code></td><td valign="top">-</td><td valign="top">Within the <code>li-section</code> attribute, you can use <code>li-block</code> to create repeating elements (<a href="https://shopify.dev/docs/storefronts/themes/architecture/blocks">Blocks</a>) that can later be edited directly in the Shopify editor. <a href="../section-settings/blocks">Learn more</a>.</td></tr><tr><td valign="top"><code>li-content-for-blocks</code></td><td valign="top">-</td><td valign="top">This attribute allows you to group multiple <code>li-block</code> elements, providing editors with various options to rearrange elements within a section. Additionally, it enables the inclusion of app blocks in the section. <a href="../../section-settings/blocks#li-content-for-blocks">Learn more.</a></td></tr><tr><td valign="top"><code>li-content-for-theme-blocks</code></td><td valign="top">-</td><td valign="top">This attribute allows you to create block files and nested block elements, providing editors with various options to rearrange elements within a section. Additionally, it enables the inclusion of app blocks in the section. <a href="../section-settings/theme-blocks">Learn more.</a></td></tr><tr><td valign="top"><code>li-page</code></td><td valign="top"><code>li-layout</code></td><td valign="top">The <code>li-page</code> attribute specifies the type of <a href="https://shopify.dev/docs/storefronts/themes/architecture/sections">template for a page</a>, such as a product or article page. This attribute must be attached to the <code>&#x3C;body></code> element of the page. <a href="../fundamentals/template-structure">Learn more.</a></td></tr><tr><td valign="top"><code>li-layout</code></td><td valign="top"><code>li-page</code></td><td valign="top">The <code>li-layout</code> attribute specifies the type of layout which should be used on this template. This helps to minimize the number of layout files in your theme. This attribute must be attached to the <code>&#x3C;body li-page=""></code> element of the page. <a href="../fundamentals/template-structure">Learn more.</a></td></tr><tr><td valign="top"><code>li-content-for-layout</code></td><td valign="top">-</td><td valign="top">Every page requires this attribute. Within the element containing this attribute, you can place all the sections that can later be rearranged using Shopify 2.0. This attribute is typically applied to the <code>main</code> element of the page. <a href="../fundamentals/template-structure">Learn more</a>.</td></tr><tr><td valign="top"><code>li-form</code></td><td valign="top">-</td><td valign="top">This attribute offers versatile functionality by wrapping the attribute value in <code>{% ... %}</code>. For example, you can easily assign a variable using <code>li-tag</code>, such as: <code>li-tag="assign title = product.title"</code>. <a href="../liquid-attributes/forms">Learn more.</a></td></tr><tr><td valign="top"><code>li-liquid</code></td><td valign="top">-</td><td valign="top">This attribute helps maintain the Liquid syntax within a code block. <a href="../../liquid-attributes/miscellaneous#li-liquid">Learn more</a>.</td></tr><tr><td valign="top"><code>li-snippet</code></td><td valign="top">-</td><td valign="top">This attribute creates reusable <a href="https://shopify.dev/docs/storefronts/themes/architecture#snippets">snippets</a> in Shopify, making it easier to build scalable templates. <a href="../liquid-attributes/snippets">Learn more</a>.</td></tr><tr><td valign="top"><code>li-element</code></td><td valign="top">-</td><td valign="top">This attribute is a specialized <code class="expression">space.vars.Company</code> attribute with predefined functionalities. A complete list of all <code>li-elements</code> can be found <a href="../add-ons/liquiflow-elements">here</a>.</td></tr><tr><td valign="top"><code>li-cloak</code></td><td valign="top">-</td><td valign="top">Elements with the <code>li-cloak</code> attribute are hidden using CSS. The <code>li-cloak</code> tag is removed during conversion. <a href="../../liquid-attributes/miscellaneous#li-cloak">Learn more.</a></td></tr></tbody></table>
