question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exported types for EmblaOptions

See original GitHub issue

Feature request is related to

  • embla-carousel (core package)
  • embla-carousel-react
  • embla-carousel-autoplay
  • embla-carousel-auto-height
  • embla-carousel-class-names
  • embla-carousel-docs (documentation website)

Is your feature request related to an issue?

Yes.

Describe the solution you’d like

Is there a way we can get Types for each component please? I’ve migrated to the latest version as we were experiencing some snapping issues and I cannot get exported types for EmblaOptionsType

Describe alternatives you’ve considered

I’ve struggled to get round this as I am migrating. Before I could use import { Options } from 'embla-carousel/components/options';

Additional context

n/a

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davidjerlekecommented, Mar 10, 2022

@Davy-F, alternatively, you could try:

import { EmblaOptionsType } from 'embla-carousel-react';

type SomeType = {
  align: EmblaOptionsType['align']
}

?

0reactions
davidjerlekecommented, Mar 12, 2022

@Davy-F I’ve created a guide in the docs that demonstrates usage with TypeScript.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript - Embla Carousel
The embla-carousel package exports a set of useful types that you can import like so: ; You can use these types to create...
Read more >
Exported types for EmblaOptions · Issue #293 - GitHub
I've migrated to the latest version as we were experiencing some snapping issues and I cannot get exported types for EmblaOptionsType ...
Read more >
Basic Embla Carousel - StackBlitz
import { useEmblaCarousel } from. "embla-carousel/react";. const slides = [1, 2, 3, 4, 5, 6, 7, 8, 9,. 10, 11];. const indexToColor =...
Read more >
embla-carousel-react - npm
A lightweight carousel library with fluid motion and great swipe precision. Latest version: 7.0.1, last published: 10 days ago.
Read more >
Carousel - Mantine
To solve this issue use useAnimationOffsetEffect hook exported from @mantine/carousel package. It accepts embla instance as first argument and transition ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found