studio1902/statamic-peak-tools
Handy utilities for Statamic from Studio 1902, built to complement the Peak starter kit. Adds practical tags, modifiers and helpers that speed up everyday site building, so you spend less time on boilerplate and more on content and design.
This is not a standalone package. It is the shared Antlers layer of the Statamic Peak starter kit, extracted so that Peak and its child sites/starters can share the same tags, modifiers, and partials. Treat it as glue code for a Peak-based site, not as a general-purpose library you would pull into an arbitrary Statamic project.
Minimal path:
composer require studio1902/statamic-peak-tools and confirm the installed version aligns with your Peak branch (Peak 5/6/7 lines map to different Statamic majors).config/app.php registration.src/ directory (tag and modifier classes), then the README for the exact tag namespace, and finally Peak's own resources/views/ for how the tools are actually consumed. The tools only make sense in the context of Peak's view structure.If you are not on Peak, stop here. The cost of reverse-engineering the expected view paths and conventions almost always exceeds writing the few modifiers you actually need.
Use it as the component layer, not a feature layer. The day-to-day value is calling the shared Antlers partials/tags from your own templates so your markup matches Peak's output. Build your page templates on top of those components instead of duplicating button, card, and bard markup.
Wrap Bard output centrally. The most common workflow is rendering a Bard field through the package's bard partials so that every set type (text, image, quote, video, etc.) has one canonical renderer. When a client asks for a new set type, you add one partial in your project and it is picked up everywhere the field is rendered — rather than editing each template.
Slot-based composition. Peak's components use Antlers slots ({{ slot }} / named slots). Pattern:
{{ partial:components/button variant="primary" }}
Book now
{{ /partial:components/button }}
Keep your own project components in the same shape so they are interchangeable with the package's.
Modifier chains over custom PHP. For string/array formatting (URLs, class lists, responsive image data), prefer the package's modifiers plus core Statamic modifiers in a chain. Reach for a custom modifier only when the logic is genuinely domain-specific, and put it in your app, not in a fork of this package.
Extend via your own namespace, not by editing vendor. Register project-specific tags/modifiers in app/ and call them alongside the package's. Peak updates then flow through without merge conflicts.
Pair with Peak's config. Anything the tools read from config should be set in config/statamic/ (or Peak's own config files) in your project. Check the package source for which config keys it reads before overriding templates — a template override can silently bypass a config expectation.
Caching discipline. These are rendered on every request in a typical Peak setup. Use Statamic's static caching / half-measures, and avoid passing large collections into slot components when a cached partial would do.
composer update on Peak without a matching tools version is the most likely source of "partial not found" or "undefined variable" errors. Pin both together and read the Peak upgrade guide, not just this repo's releases.resources/views/components, bard partial sets). Installing it into a bare Statamic site produces missing-view errors that look like package bugs but are configuration mismatches.{{ dump }} the variable before the tag call, then check whether the tag expects a specific fieldtype shape (e.g., a Bard value object vs. a raw array). The mismatch is usually in the data, not the tag.Statamic::tag() / modifier registry and composing alongside. Do not patch vendor/.APP_DEBUG=true locally, and use {{ dump:var }}. For performance issues, time the partial in isolation — nested slot components are the usual culprit, not the package itself.How can I help you explore Laravel packages today?