Tangent Developer Hub & Extensibility Guide
The comprehensive developer reference and extensibility guide for Tangent. Learn how to create custom JSON templates, build modular Liquid sections and blocks, connect to window-level event bus contracts, and extend styling tokens while maintaining sub-second performance and strict Shopify quality standards.
4 Architectural Tracks
The engineering pillars underpinning every commercial preset, section, and interactive component in the platform.
[1] Liquid Runtime Engine
High-Performance Server-Side Rendering
Ultra-lean Liquid template engine executing under strict shopify theme check constraints. Zero redundant passes, atomic snippet composition, and optimized asset preload declarations delivering sub-100ms server TTFB.
Atomic snippet hierarchy, native image filters, and sub-100ms server response TTFB
- Atomic snippet hierarchy in snippets/*.liquid
- Native image filters (image_url: width, format: webp)
- Deterministic schema defaults without null fallbacks
[2] Autonomous Web Components
Zero-Framework Native Custom Elements
Client-side functionality is encapsulated strictly in native HTML5 Custom Elements. No monolithic React or Vue runtimes. Each element independently manages its lifecycle, keyboard focus, and DOM tree.
Autonomous HTML5 custom elements without monolithic third-party framework bundles
- <cart-drawer> with progressive drawer physics
- <sticky-header> with zero-CLS scroll direction observers
- <video-media> with IntersectionObserver lazy playback
[3] 53 Modular Liquid Sections
Online Store 2.0 Architectural Suite
A comprehensive encyclopedia of 53 production-tested, theme-editor customizable sections spanning 9 structural categories. Fully reorderable, supporting dynamic blocks and app embeds.
53 production-tested sections 100% validated against Shopify Online Store 2.0 specifications
- Category-mapped directory taxonomy
- Preset-ready settings configurations
- Native dynamic section rendering via /?section_id=
[4] Decoupled Event Bus
Asynchronous Window-Level Pub/Sub Contract
Components communicate without tight coupling through standardized CustomEvents dispatched on the global window. Modules can be added, updated, or swapped without breaking dependencies.
Decoupled CustomEvent pub/sub contracts on window enabling modular component swapping
- tangent:cart:updated for real-time totals
- tangent:variant:changed for media & price synchronization
- tangent:modal:opened with automatic focus trapping
The Six Extensibility Tracks
Practical development blueprints for extending Tangent. Add new pages, custom sections, dynamic blocks, atomic snippets, custom JavaScript, and CSS tokens safely without modifying core runtime files.
Track 1: Creating New Pages
JSON templates decouple layout structure from Shopify content. You can create custom landing pages, brand stories, or campaign hubs by declaring modular sections and their display order.
Create a JSON template file under templates/ or add a page in Shopify Admin.
Define the section order in the template JSON.
Assign the template to your target products or pages.
Track 2: Adding & Managing Sections
Custom sections provide merchant-editable building blocks with customizable spacing and presets for instant discovery.
Open the Shopify Theme Customizer.
Click "+ Add section" on any page.
Reorder sections and configure settings.
Track 3: Adding Child Blocks
Blocks allow merchants to add, reorder, and configure dynamic child items within a parent section without code changes.
Select any section in the Theme Editor.
Click "+ Add block" to insert child elements (slides, metrics, columns).
Drag blocks to reorder.
Track 4: Using Reusable Snippets
Reusable snippets promote DRY architecture across sections while keeping presentation logic modular.
Place atomic Liquid snippets under snippets/.
Pass parameters cleanly to reuse cards, icons, or badges.
Keep presentation logic modular.
Track 5: Storefront Behaviors & Apps
Extend storefront interactions without bloated client frameworks using native browser events and Shopify app blocks.
Sections communicate seamlessly across the cart drawer, predictive search, and variant selectors.
Integrates with official Shopify App Blocks without custom scripts.
Fast, zero-bloat native browser interactions.
Track 6: Brand Styling & Colors
Customize typography, palettes, and layout rhythm safely by referencing theme design tokens and presets.
Open Theme Settings in the Customizer.
Choose from 5 luxury presets or adjust brand colors.
Spacing and typography automatically harmonize.
Shopify Theme Development Best Practices & Standards
Strict engineering standards adhered to across Tangent. Use this checklist when authoring custom sections or extending store layouts.
Shopify Theme Check Compliance
Strict Shopify Theme Check AST validation. Zero deprecated Liquid tags (legacy include tags are prohibited in favor of modern render tags), clean schema keys, and zero unclosed tags.
- shopify theme check --fail-level error before every git commit
- Parameter isolation on all Liquid snippets with zero global leakage
- Type-safe JSON schema declarations with required defaults
High-Performance Image Pipeline
Optimal image delivery utilizing native image_tag filters with responsive srcset widths, explicit aspect ratios, and loading: "lazy" to guarantee zero Cumulative Layout Shift (CLS).
- Always specify explicit aspect ratio or width/height attributes
- Use image_tag with responsive widths: 375, 750, 1100, 1500
- Reserve fetchpriority: "high" exclusively for the initial above-the-fold LCP image
WCAG 2.2 AA Accessibility Contracts
Complete keyboard operability, visible focus rings, minimum 44x44px touch targets, ARIA dialog modal semantics, and screen-reader announcements on dynamic mutations.
- Interactive elements reachable and operable via Tab, Enter, and Space keys
- Visible focus rings (focus-visible:ring-2 focus-visible:ring-accent-brand)
- Live regions (aria-live="polite") on cart drawer and predictive search results
Performance Envelope & Zero Runtime Bloat
Strict runtime payload envelope (< 25 KB gzipped total JS). Zero monolithic third-party libraries (no jQuery, no Lodash, no React/Vue on the merchant storefront).
- Autonomous HTML5 Custom Elements with zero runtime framework dependencies
- Native browser APIs: IntersectionObserver, ResizeObserver, CustomEvent
- Lazy asset loading for below-the-fold media and secondary modals
System Specifications & Parameter Tables
Runtime Requirements & Performance Envelopes
Global platform constraints, bundle targets, and compiler requirements validated on each build.
| Parameter / Key | Description & Constraints |
|---|---|
shopify.theme.specificationRequiredType: string | Official Shopify OS 2.0 architecture standard with modular JSON templates. ℹ Enforces templates/*.json dynamic section support. Default: Online Store 2.0 |
shopify.theme_check.versionRequiredType: semver | Strict Liquid linter ensuring zero deprecated Liquid tags and optimal AST parsing. Default: >= 2.15.0 |
client.runtime_budget.max_jsRequiredType: bytes | Zero third-party runtime bundles. Exclusively native Custom Elements. Default: < 25 KB gzipped |
rendering.server_ttfb_targetRequiredType: duration | Target Shopify edge server response time on cache hit. Default: < 100 ms |
browser_support.targetsType: browserslist | Modern evergreen browser support matrix with native dialog and shadow DOM. Default: Chrome >= 100, Safari >= 15.4, Firefox >= 100, Edge >= 100 |
Autonomous Web Components Specification
Native Custom Elements registered in the theme without third-party framework dependencies.
| Parameter / Key | Description & Constraints |
|---|---|
cart-drawerRequiredType: CustomElement | Autonomous slide-over slideout drawer with optimistic cart mutation and tiered shipping bar. ℹ Dispatches and listens to tangent:cart:updated. Default: assets/cart-drawer.js |
video-mediaRequiredType: CustomElement | Deferred lazy-load wrapper for native HTML5, Vimeo, and YouTube background players. ℹ Employs IntersectionObserver to delay video fetch until within 200px of viewport. Default: assets/video-media.js |
predictive-searchRequiredType: CustomElement | Instant search dialog querying Shopify Predictive Search API with 300ms debounce. ℹ Accessible keyboard focus trapping and ARIA combobox semantics. Default: assets/predictive-search.js |
sticky-headerRequiredType: CustomElement | High-performance scroll direction observer pinning navigation on scroll up with zero CLS. Default: assets/sticky-header.js |
compare-sliderType: CustomElement | Interactive before/after image split-screen comparison slider with touch gesture support. Default: assets/compare-slider.js |
Window Event Bus Contracts (tangent:*)
Decoupled pub/sub messaging signatures dispatched across theme sections and custom blocks.
| Parameter / Key | Description & Constraints |
|---|---|
tangent:cart:updatedRequiredType: CustomEvent<{ cart: object; openDrawer: boolean }> | Dispatched whenever line items are added, updated, or removed from cart state. ℹ Bubbles: true, Composed: true on window. |
tangent:variant:changedRequiredType: CustomEvent<{ variantId: number; available: boolean; price: number }> | Dispatched when product options or swatch selections change variant identity. |
tangent:modal:openedType: CustomEvent<{ modalId: string; triggerElement: HTMLElement }> | Notifies theme layers to manage background scrolling lock and inert flags. |
tangent:search:resultsType: CustomEvent<{ query: string; totalResults: number }> | Broadcasts predictive search completion for analytics or custom UI binding. |
Theme Structure Overview
Standard Shopify Online Store 2.0 directory blueprint organized into 5 primary architectural modules.
Online Store 2.0 JSON Templates
Declares page layout hierarchy and section sequence for index, products, collections, cart, and custom landing pages.
53 Modular Liquid Sections
Reorderable, merchant-configurable visual building blocks with rich settings schemas and dynamic blocks.
Reusable Liquid Snippets
Atomic UI components, badges, and accessible SVG icons cleanly parameterized without outer scope leakage.
Storefront Runtime Assets
High-performance CSS design tokens, typography styles, and native HTML5 Custom Elements under a 25 KB budget.
Theme Settings & Presets
Central settings schema defining global typography, color system, and 5 luxury commercial brand presets.