Skip to content

Instantly share code, notes, and snippets.

Created Jun 16, 2020
What would you like to do?
Alpine.js basic data binding example.
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<script src="" defer></script>
<div x-data="{ first: 0, second: 0 }">
<input type="text" x-model.number="first"> + <input type="text" x-model.number="second"> = <output x-text="first + second"></output>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment