Developer docs
Avante developer reference: bundled libraries, CSS and JavaScript structure, custom code files, theme events, and how layouts adapt between sidebars.
This page is for developers, agencies, and anyone comfortable with HTML, CSS, and JavaScript.
Theme dependencies
Avante bundles these third-party libraries:
Swiper
11.1.14
assets/swiper-bundle.min.js
Sliders and carousels across the theme. Loaded on every page.
Masonry
4.2.2
assets/masonry.pkgd.min.js
Cascading layout in Image grid, Blog post, and Multicolumn (CascadingGrid, <cascading-grid>). Loaded on every page.
GSAP TweenMax
2.1.2
assets/TweenMax.min.js
Hover image reveal in Collection list with popover image, Link list with popover image, Scrolling promotion, and Quick filter (HoverImageReveal, <link-hover-image>). Loaded only when needed.
Quicklink
—
assets/quicklink.umd.js
Preload links on hover. Prefetches same-site links visible on screen. Not loaded in the theme editor.
UI Initiative Stories Slider and Carousel effect
1.0.0
assets/stories-slider.min.js, assets/effect-carousel.min.js
Stories slideshow section only.
Theme architecture
The file structure follows the standard Shopify theme structure.
CSS. Almost all styles are in assets/base.css, loaded on every page. A few files load only where they are needed: RTL styles, customer account pages, policy pages, Swiper, Product bundle, and Stories slideshow. All CSS is written in-house. No CSS framework is used.
JavaScript. assets/global.js holds the shared components: the product form, variant picker, quantity input, drawers and modals, color swatches, infinite scroll, and more. Larger features have their own files and load only where they are used, for example cart-drawer.js, quick-view.js, facets.js, media-gallery.js, predictive-search.js, product-bundle.js, quick-filter.js, and reveal-animation.js.
Adding custom JavaScript and CSS
Avante has placeholder files for your own code, so you do not have to edit theme files.
Turn the files on
In Online Store → Themes → ⋯ → Edit code, open snippets/custom-assets.liquid. Set useCustomScript to true for JavaScript and useCustomStyles to true for CSS.
Add your code
Write JavaScript in assets/custom-script.js and CSS in assets/custom-styles.css. The CSS file loads after base.css. The script loads with defer.
For a few CSS rules, Theme settings → Custom CSS in the theme editor works too, with no code editor needed.
Custom events
Avante dispatches events at key moments. Unless a row says otherwise, the event fires on document, and its data is in event.detail.
Layout between sidebars
When the store uses sidebar navigation, the main content area sits between the sidebars, so it is narrower than the browser window. Sections adapt to the width of that area, not the window.
With sidebars on, the content wrapper .inside-content is a CSS container named inside-content. The theme switches section layouts with container queries at 1440px, 1200px, 1024px, 920px, 768px, and 500px. Without sidebars, regular media queries apply.
To make your own CSS follow the same layout, write a rule for each case:
Related
Last updated
Was this helpful?
