hyva-themes avatar

Hyva Alpine Component

If you're building on Hyvä themes for Magento 2, you'll need to write Alpine.js components that respect Content Security Policy rules, especially with PCI-DSS 4.0 compliance coming due. This skill walks you through the CSP-compatible patterns: no inline mutations or arguments, use methods instead of expressions, replace x-model with manual bindings, and always register components with Alpine.data inside the alpine:init event. The most useful bit is the practical reference for two-way binding on inputs, checkboxes, and selects without x-model, plus the dataset pattern for passing arguments to methods. It's structured as a reference guide with side-by-side comparisons of what breaks CSP and what works.

skills.sh installs
1.3K
GitHub stars
85
last updated
Aug 21, 2026

Install

$ npx -y skills add hyva-themes/hyva-ai-tools --skill hyva-alpine-component --agent claude-code

Installs into .claude/skills of the current project.

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

CapabilityStandard AlpineAlpine CSP
Property readsx-show="open"Same
Negationx-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-modelAvailableNot supported - use :value + @input
Range iterationx-for="i in 10"Not supported

Component Structure Pattern

Every Alpine component in Hyvä follows this structure:

Sponsors

Details

Repository
github.com/hyva-themes/hyva-ai-tools
Categories
Frontend Development, Security, AI & Agent Building
First seen
Jun 3, 2026

More from hyva-themes/hyva-ai-tools

All 12
1martinholovsky avatarwindows-ui-automationmartinholovsky/claude-skills-generatorExpert in Windows UI Automation (UIA) and Win32 APIs for desktop automation. Specializes in accessible, secure automation of Windows applications including elem1.3Kskills.sh installs
2existential-birds avatarreact-flowexistential-birds/beagleReact Flow (@xyflow/react) for workflow visualization with custom nodes and edges. Use when building graph visualizations, creating custom workflow nodes, imple1.3Kskills.sh installs
3jezweb avatarreact-nativejezweb/claude-skillsReact Native and Expo patterns for building performant mobile apps. Covers list performance, animations with Reanimated, navigation, UI patterns, state manageme1.3Kskills.sh installs
4reactjs avatarreact-expertreactjs/react.devUse when researching React APIs or concepts for documentation. Use when you need authoritative usage examples, caveats, warnings, or errors for a React feature.1.3Kskills.sh installs
5jezweb avatarreact-patternsjezweb/claude-skillsReact 19 performance patterns and composition architecture for Vite + Cloudflare projects. 50+ rules ranked by impact — eliminating waterfalls, bundle optimisat1.3Kskills.sh installs
6react-native-community avatarupgrade-react-nativereact-native-community/skillsUse when upgrading react-native to a newer version. Handles version bumps, native project changes (Android/iOS), dependency updates, and breaking change migrati1.3Kskills.sh installs