Hyva Alpine Component
Constructor-driven Alpine.js components for Hyvä Magento themes, written to work under strict CSP with no unsafe-eval.
- CCM score
- 69 of 100
- skills.sh installs
- 1.4K
- GitHub stars
- 86
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the Alpine CSP constraints table, component structure, constructor registration, property access, mutations, and x-for patterns
- Includes
x-modelreplacements for text, number, textarea, checkbox, and select inputs, plus thehyvautility functions - Enforces
Alpine.data()registration insidealpine:initwith{once: true}and$hyvaCsp->registerInlineScript()after every script block - Designed for Magento 2 developers building Hyvä templates on payment pages subject to PCI-DSS 4.0 CSP rules
Install
$ npx -y skills add hyva-themes/hyva-ai-tools --skill hyva-alpine-component -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Hyvä Alpine Component
Overview
This skill provides guidance for writing CSP-compatible Alpine.js components in Hyvä themes. Alpine CSP is a specialized Alpine.js build that operates without the unsafe-eval CSP directive, which is required for PCI-DSS 4.0 compliance on payment-related pages (mandatory from April 1, 2025).
Key principle: CSP-compatible code functions in both standard and Alpine CSP builds. Write all Alpine code using CSP patterns for future-proofing.
CSP Constraints Summary
| Capability | Standard Alpine | Alpine CSP |
|---|---|---|
| Property reads | x-show="open" | Same |
| Negation | x-show="!open" | Method: x-show="isNotOpen" |
| Mutations | @click="open = false" | Method: @click="close" |
| Method args | @click="setTab('info')" | Dataset: @click="setTab" data-tab="info" |
x-model | Available | Not supported - use :value + @input |
| Range iteration | x-for="i in 10" | Not supported |
Component Structure Pattern
Every Alpine component in Hyvä follows this structure:
Details
- Repository
- github.com/hyva-themes/hyva-ai-tools
- Categories
- Frontend & UI Code, PHP & Laravel
- First seen
- Jun 3, 2026
More from hyva-themes/hyva-ai-tools
All 12Similar to Hyva Alpine Component
More Frontend & UI Codehyva-cms-componenthyva-themes/hyva-ai-tools793 installsCreates custom Hyvä CMS components with components.json, PHTML templates, field presets, and setup:upgrade.
hyva-ui-componenthyva-themes/hyva-ai-tools1.4K installsApplies Hyvä UI template-based components to a Hyvä theme by copying their source files and variants.
alpinejsbrettatoms/agent-skills267 installsPractical Alpine.js reference that keeps HTML directives short by moving logic into extracted components and stores.
alpine-jsmindrally/skills1.4K installsLightweight reactive interactions for Alpine.js, pairing Tailwind CSS styling with Livewire or Ghost backends.
magento-hyva-specialistmaxnorm/magento2-agent-skills886 installsModern Magento 2 storefront development on the Hyvä framework, covering Alpine.js components and Tailwind CSS styling.
vue-best-practicesvuejs-ai/skills47.2K installsVue 3 guidance that enforces Composition API with <script setup> and TypeScript for every Vue task.