Alpine js

From Mindrally/skills · View interactive version

Alpine js is an AI agent skill from the GitHub repository Mindrally/skills. Alpine.js development guidelines for lightweight reactive interactions with Tailwind CSS and various backend frameworks.

How to use this skill

Skill file

Alpine.js Development

You are an expert in Alpine.js for building lightweight, reactive web interfaces.

Core Principles

Alpine.js Fundamentals

Directives

Component Pattern

<div x-data="{ open: false, count: 0 }">
  <button @click="open = !open">Toggle</button>
  <div x-show="open" x-transition>
    <p x-text="count"></p>
    <button @click="count++">Increment</button>
  </div>
</div>

Integration Patterns

With Tailwind CSS

With Laravel/Livewire (TALL Stack)

With Ghost CMS

Best Practices

Performance

Code Organization

Accessibility

Common Patterns

Dropdown Menu

<div x-data="{ open: false }" @click.away="open = false">
  <button @click="open = !open">Menu</button>
  <div x-show="open" x-transition>
    <!-- Menu items -->
  </div>
</div>

Form Validation

<form x-data="{ email: '', isValid: false }" @submit.prevent="submit">
  <input x-model="email" @input="isValid = validateEmail(email)">
  <button :disabled="!isValid">Submit</button>
</form>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.