Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
FormInput.svelte
AppLabel.svelte
AppInput.svelte
AppButton.svelte
<script>
import FormInput from './FormInput.svelte';
import AppButton from './AppButton.svelte';

let email;
let password;
const login = () => {
console.log(`${email} | ${password}`);
};
</script>

<div>
<FormInput
name='email'
type='email'
title='email'
bind:inputValue='{email}'
placeholder='メールアドレスを入力してください'
/>
<FormInput
name='password'
type='password'
title='パスワード'
bind:inputValue='{password}'
placeholder='パスワードを入力してください'
/>
</div>
<AppButton on:click='{login}'>ログイン</AppButton>

<h1>email: {email}</h1>
<h1>password: {password}</h1>

loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */