MCPcopy Index your code
hub / github.com/choojs/nanoanimation

github.com/choojs/nanoanimation @v2.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1.0 ↗ · + Follow
2 symbols 2 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

nanoanimation

npm version build status downloads js-standard-style

Safety wrapper around the Web Animations API. Allows animations to safely be defined in Node, and browsers that don't support the Web Animation API. Default behavior is to do nothing.

Usage

var animation = require('nanoanimation')
var css = require('sheetify')
var html = require('bel')

css('tachyons')

var el = html`


 move.play()}>
    Hello planet



`

var keyFrames = [
  { transform: 'translateY(0%)' },
  { transform: 'translateY(100%)' }
]

var timingProperties = {
  duration: 1000,
  fill: 'forwards'
}

var animate = animation(keyFrames, timingProperties)
var move = animate(el, function () {
  console.log('event ended')
})
document.body.appendChild(el)

API

animate = animation(keyFrames, timingProperties)

Create a new animation.

WebAnimation = animate(el, [done])

Apply an animation to an element, calls done when finished. Returns the nativate Web Animation object.

See Also

License

MIT

Core symbols most depended-on inside this repo

Shape

Function 2

Languages

TypeScript100%

Modules by API surface

index.js2 symbols

For agents

$ claude mcp add nanoanimation \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page