Get started with mavo CDN
Stable version
Copied!
How to start using mavo CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with mavo CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/mavo.min.css">
<script src="https://cdn.cdnhub.io/mavo/0.3.0/mavo.min.js"></script>
</head>
<body>
<mavo-app>
<mavo-form>
<mavo-textfield name="name" label="Your name" required></mavo-textfield>
<mavo-textfield name="email" label="Your email" type="email" required></mavo-textfield>
<mavo-button type="submit">Submit</mavo-button>
</mavo-form>
</mavo-app>
<script>
const form = document.querySelector('mavo-form');
form.addEventListener('mavo:submit', (event) => {
event.preventDefault();
console.log('Form data:', event.detail.data);
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!