0.0.3 • Published 2 years ago

svelte-draw-border v0.0.3

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

svelte-draw-border

Draw smooth borders around any element, with Svelte

Docs/ Demo

Installation

npm i svelte-draw-border

Usage

Currently the animation is only triggered on hover.

<script>
  import DrawBorder from 'svelte-draw-border';
</script>

<DrawBorder initialColor="green" endColor="white">
  <button>Submit</button>
</DrawBorder>

Props

NameTypeDefaultDescription
borderRadiusstring'0px'Works with any valid CSS border-radius value
borderWidthstring'2px'Use px, ems, or rems
initialColorstring'white'Works with any valid CSS color value
endColorstring'greenWorks with any valid CSS color value
startingDegnumber90The position of the animation start, 0 being the middle & top of the target element
direction'clockwise', 'counter-clockwise''clockwise'The direction of the animation