Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Theme Block Extensions
Theme blocks are Liquid-based UI components that merchants can add to their storefront themes. They appear in the theme editor alongside native blocks, allowing merchants to position and configure them visually.How Theme Blocks Work
- Your app installs block files (
.aquatemplate +.schema.jsonschema) - Blocks appear in the merchant’s theme editor under “App Blocks”
- Merchants drag blocks into sections and configure settings
- LaunchMyStore renders your block using the Liquid template engine
Block File Structure
Each theme block requires two files:Creating a Theme Block
1. Write the Liquid Template
Theme blocks use.aqua files with standard Liquid syntax:
2. Define the Schema
The schema controls what settings appear in the theme editor:Available Targets
Thetarget field determines which page types your block can be added to:
| Target | Description | Available Objects |
|---|---|---|
index | Homepage | shop, collections, articles |
product | Product pages | product, shop, collection |
collection | Collection pages | collection, products, shop |
cart | Cart page | cart, shop |
article | Blog articles | article, blog, shop |
page | Custom pages | page, shop |
blog | Blog listing | blog, articles, shop |
search | Search results | search, results, shop |
You can target multiple page types by specifying an array:
"target": ["product", "collection"]Setting Types
Basic Inputs
Selection Inputs
Range & Toggle
Visual Pickers
Resource Pickers
Installing Theme Blocks
Install blocks when your app is installed on a store:Extension Assets
Reference your extension’s assets using theextension_asset_url filter:
Snippets
Create reusable components as snippets:Accessing Data
Block Settings
Access settings viablock.settings:
Global Objects
Standard Shopify global objects are available:Metafields
Access your app’s metafields:Best Practices
Keep templates performant
Keep templates performant
Avoid complex logic in Liquid. Pre-compute values in your backend and store them in metafields.
Use semantic HTML
Use semantic HTML
Use proper heading levels, ARIA labels, and semantic elements for accessibility.
Scope your CSS
Scope your CSS
Prefix class names with your app handle to avoid style conflicts with the theme.
Lazy load JavaScript
Lazy load JavaScript
Use
defer or dynamic imports for JavaScript to avoid blocking page render.Support theme settings
Support theme settings
Respect the merchant’s theme colors and fonts where possible. Use CSS custom properties.
Test across themes
Test across themes
Test your blocks with multiple themes to ensure compatibility with different layouts.