Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@motionone/svelte

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@motionone/svelte

A tiny, performant animation library for Svelte

  • 10.6.0-rc.3
  • npm
  • Socket score

Version published
Weekly downloads
252K
decreased by-3.01%
Maintainers
2
Weekly downloads
 
Created

What is @motionone/svelte?

@motionone/svelte is a Svelte-specific package that provides powerful and easy-to-use animation capabilities. It leverages the Motion One library to offer a declarative way to create animations in Svelte applications.

What are @motionone/svelte's main functionalities?

Basic Animations

This feature allows you to create basic animations such as fading in and sliding up elements. The `animate` directive is used to define the animation properties.

<script>
  import { animate } from '@motionone/svelte';
</script>

<div use:animate={{ opacity: [0, 1], transform: ['translateY(20px)', 'translateY(0)'] }}>
  Fade in and slide up
</div>

Keyframe Animations

This feature allows you to create more complex animations using keyframes. The `animate` directive can take an array of keyframes to define the animation sequence.

<script>
  import { animate } from '@motionone/svelte';
</script>

<div use:animate={{ keyframes: [
  { opacity: 0, transform: 'translateY(20px)' },
  { opacity: 1, transform: 'translateY(0)' }
] }}>
  Keyframe animation
</div>

Spring Animations

This feature allows you to create spring-based animations, which provide a more natural and bouncy effect. The `spring` directive is used to define the spring properties.

<script>
  import { spring } from '@motionone/svelte';
</script>

<div use:spring={{ stiffness: 200, damping: 20 }}>
  Spring animation
</div>

Other packages similar to @motionone/svelte

FAQs

Package last updated on 22 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc