Preview build: purchases open after content licensing is confirmed.
Free playground
Original, working examples of Shopify sections and snippets. Inspect the code, preview the output, copy the files and adapt them for your own theme. No account needed.
These are free educational examples — written for this playground or adapted from real storefront builds. They are not the paid library — member resources live behind sign-in and are only released after licensing is confirmed.
A dismissible top-of-page message with configurable text, link and colours.
Free delivery on orders over $75
Approximate rendering. Your theme's fonts, colours and base styles will apply on the storefront.
sections/announcement-bar.liquid
{%- if section.settings.text != blank -%} <div class="gpl-announcement" role="region" aria-label="Announcement" style="--gpl-bg: {{ section.settings.bg }}; --gpl-fg: {{ section.settings.fg }};"> {%- if section.settings.link != blank -%} <a href="{{ section.settings.link }}">{{ section.settings.text | escape }}</a> {%- else -%} <p>{{ section.settings.text | escape }}</p> {%- endif -%} <button type="button" class="gpl-announcement__close" aria-label="Dismiss announcement">×</button> </div>{%- endif -%} {% schema %}{ "name": "Announcement bar", "settings": [ { "type": "text", "id": "text", "label": "Message", "default": "Free delivery on orders over $75" }, { "type": "url", "id": "link", "label": "Link (optional)" }, { "type": "color", "id": "bg", "label": "Background", "default": "#0b1220" }, { "type": "color", "id": "fg", "label": "Text colour", "default": "#c8f542" } ], "presets": [{ "name": "Announcement bar" }]}{% endschema %}These controls mirror how the snippet reads theme settings or render parameters on a real store.
File name shown: sections/announcement-bar.liquid · These are GPLMart's original teaching examples, not the paid library. They are provided as-is for learning.