Documentation is under construction
Our documentation is currently under construction. We're working diligently to provide you with comprehensive and helpful resources, but it may take a little more time to complete.

Liquify Pro Cheatsheet

Here is a list of all the currently available Liquify Pro 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.

Attribute name
Compatible with
Description
li-object
Compatible with:
li-attribute, li-object
Description:

To insert a Shopify object, use li-object="product.title". This will render as {{ product.title }} within the attached element. You can also use a modifier to specify its position, such as li-object:class="product.title", which will render as class="{{ product.title }}". Learn more.

li-attribute
Compatible with:
li-object, li-attribute
Description:

This tag allows us to use reserved attributes like class or src on every element. This is an example on how to use it: li-attribute:class = "{% if product.available %} tex-color-green {% endif %}" will be converted into class = "{% if product.available %} tex-color-green {% endif %}". Learn more.

li-js-object
Compatible with:
li-js-object
Description:

This attribute generates an Alpine.js object (x-bind or x-text) 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 li-object. Learn more.

li-settings
Compatible with:
li-settings
Description:

You can implement settings that allow your Shopify content editor to modify both the content and appearance directly within Shopify. To achieve this, we've introduced the li-settings tag. For example, li-settings:text to provide a text input. Learn more.

li-for
Compatible with:
-
Description:

When you need to iterate over an array, such as a list of products or product tags, you can employ the li-for tag. This tag will duplicate the attached element. Within a loop, you have access to the object you're iterating through. For example, li-for="product in collection.products". Learn more.

li-paginate
Compatible with:
-
Description:

When using a forloop with li-for, you can manage pagination using the li-paginate tag. Inside the li-paginate tag, you’ll have access to the pagination object. This is useful, for example, on collection pages. By default, only 50 products are rendered, but with li-paginate, you can override this limit.

li-if
Compatible with:
-
Description:

This tag toggles the visibility of the attached element based on a specified condition. For example, li-if="product.available" generates a conditional wrapping tag: {% if product.available %} <div>Product is available</div> {% endif %}. Learn more.

li-unless
Compatible with:
-
Description:

This tag functions similarly to li-if but displays the element when the specified condition is false. Learn more.

li-case
Compatible with:
-
Description:

When you want to display an element which should meet different conditions, you can wrap these elements with the li-case tag. Inside the wrapper, you put the elements with different li-when tags. Learn more.

li-when
Compatible with:
-
Description:

When you want to display an element which should meet different conditions, you can wrap these elements with the li-case tag. Inside the wrapper, you put the elements with different li-when tags. Learn more.

li-js-if
Compatible with:
-
Description:

This attribute generates an Alpine.js <template> with x-if 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. Learn more.

li-section
Compatible with:
-
Description:

This attribute creates a Shopify section file containing all the HTML within the element. These sections can later be rearranged in the Shopify editor, and with li-settings, their content can be made editable. Learn more.

li-block
Compatible with:
-
Description:

Within the li-section attribute, you can use li-block to create repeating elements (Blocks) that can later be edited directly in the Shopify editor. Learn more.

li-content-for-blocks
Compatible with:
-
Description:

This attribute allows you to group multiple li-block elements, providing editors with various options to rearrange elements within a section. Additionally, it enables the inclusion of app blocks in the section. Learn more.

li-page
Compatible with:
-
Description:

The li-page attribute specifies the type of template for a page, such as a product or article page. This attribute must be attached to the <body> element of the page. Learn more.

li-content-for-layout
Compatible with:
-
Description:

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 main element of the page. Learn more.

li-form
Compatible with:
-
Description:

Shopify provides forms endpoints that can be utilized with Liquify Pro. This attribute generates a form tag for various use cases. For instance, li-form="create_customer" can be used to create a registration form. Learn more.

li-tag
Compatible with:
-
Description:

This attribute offers versatile functionality by wrapping the attribute value in {% ... %}. For example, you can easily assign a variable using li-tag, such as: li-tag="assign title = product.title".

li-liquid
Compatible with:
-
Description:

This attribute helps maintain the Liquid syntax within a code block. Learn more.

li-snippet
Compatible with:
-
Description:

This attribute creates reusable snippets in Shopify, making it easier to build scalable templates. Learn more.

li-element
Compatible with:
-
Description:

This attribute is a specialized Liquify Pro attribute with predefined functionalities. A complete list of all li-elements can be found here.

Next

Liquify Elements

Use Liquify elements to enhance the user experience for your customers.

Attribute Copied!