Comments (5)
From a quick look into LottiePlayer.svelte
I came up with this declarations file (*.d.ts
):
declare module '@lottiefiles/svelte-lottie-player' {
import type { SvelteComponentTyped } from 'svelte'
export class LottiePlayer extends SvelteComponentTyped<{
autoplay?: boolean
background: string
controls: boolean
controlsLayout?: string[]
count?: number
defaultFrame?: number
direction?: number
height: number
hover?: boolean
loop?: boolean
mode?: 'normal' | 'bounce'
onToggleZoom?: (boolean) => void
renderer?: 'svg' | 'canvas'
speed?: number
src?: string
style?: string
width: number
}> {}
}
from svelte-lottie-player.
@jneuendorf just need a PR now :-D thanks man
from svelte-lottie-player.
@jneuendorf just need a PR now :-D thanks man
Done, see #17
from svelte-lottie-player.
Any updates on whether this PR will be implemented?
Cheers
from svelte-lottie-player.
In case you're a n00b like me, you need to put this code from the answer above in a file called svelte-lottie-player.d.ts
in src
and reload vscode.
from svelte-lottie-player.
Related Issues (16)
- How to control manually? HOT 2
- Accessibility warnings
- document is not defined HOT 2
- Error when importing lottie HOT 1
- error when loading .lottie files HOT 1
- Could not load content (LottiePlayer.svelte) // Error HOT 1
- Useless `bind:clientWidth` and `bind:clientHeight`
- SvelteKit issue HOT 5
- Package will break in future Svelte versions
- How do I use events like when animation finishes? HOT 5
- Width and Height "other" unit support HOT 2
- Not a valid SSR component HOT 1
- document is not defined in onDestroy() HOT 1
- sveltekit and svelte-lottie-player HOT 8
- Not able to listen to any events HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-lottie-player.