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
DrawBorder.svelte
<script>
import DrawBorder from './DrawBorder.svelte';
let text = 'Submit';
</script>

<h1>Draw Border Animation</h1>
<p>Hover to see the animation!</p>

<div class="flex-col">
<!-- Rounded with Purple & White Stroke -->
<DrawBorder borderRadius="100px">
<button>{text}</button>
</DrawBorder>
<!-- Square with Red & Blue Stroke -->
<DrawBorder
initialColor="red"
endColor="blue"
startingDeg={180}
>
<button>{text}</button>
</DrawBorder>
<!-- Slightly Rounded with White & Green Stroke -->
<DrawBorder
borderRadius="10px"
initialColor="green"
endColor="white"
startingDeg={280}
>
<button>{text}</button>
</DrawBorder>

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