Created
May 2, 2020 11:16
-
-
Save BTBTravis/52d4d8c2cd239f72ab0b5962029f26a5 to your computer and use it in GitHub Desktop.
Simple Input Demo App Written in Svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
let name = 'travis shears'; | |
</script> | |
<div class="svelte-demo-app"> | |
<div class="input-group"> | |
<label>Bound input:</label> | |
<input bind:value={name}> | |
</div> | |
<div> | |
<p>value: <span>{name}</span></p> | |
</div> | |
</div> | |
<style> | |
.svelte-demo-app { | |
padding: 1em 0; | |
} | |
label { | |
margin-right: 1em; | |
} | |
input { | |
margin: 0; | |
} | |
.input-group { | |
display: flex; | |
align-items: center; | |
} | |
span { | |
font-weight: bold; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment