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
Cursor.svelte
<script>
import Cursor from './Cursor.svelte'
</script>

<main class="main-container">
<Cursor />
<div class="inner-container">
<button class="cta-button">Hover me</button>
<p>or hover me</p>
</div>
</main>

<style>
.main-container {
width: 100%;
height: 100vh;
display: grid;
place-content: center;
}
.cta-button {
padding: 1rem 2rem;
border: 2px solid black;
background: greenyellow;
border-radius: 10px;

transition: background 0.1s ease-in-out;
}

.cta-button:hover {
background: darkseagreen;
}

.inner-container {
display: flex;
flex-direction: column;
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */