Skip to content

[Help]: Disable carousel navigation on tab #822

Closed Answered by gnllucena
gnllucena asked this question in Help
Discussion options

You must be logged in to vote

hey @harshpandey002, yes I was, I had to change a few lines of code from shadcn, and also had to hack a lot to make it work, unfortunately there's a few weird behaviors that I'm not sure if it's Embla or NextJs cache fault (honestly believe it's NextJs...)

here's my Carousel.tsx:

"use client"

import * as React from "react"
import useEmblaCarousel, {
  type UseEmblaCarouselType,
} from "embla-carousel-react"
import { ArrowLeft, ArrowRight } from "lucide-react"

import { cn } from "@/lib/utils"
import { Button } from "@/app/components/primitives/button"

type CarouselApi = UseEmblaCarouselType[1]
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
type CarouselOptions = UseCar…

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@gnllucena
Comment options

Comment options

You must be logged in to vote
4 replies
@davidjerleke
Comment options

@gnllucena
Comment options

@gnllucena
Comment options

@davidjerleke
Comment options

Comment options

You must be logged in to vote
1 reply
@flawnson
Comment options

Comment options

You must be logged in to vote
4 replies
@flawnson
Comment options

@davidjerleke
Comment options

@flawnson
Comment options

@davidjerleke
Comment options

Answer selected by davidjerleke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
resolved This issue is resolved question Question about how to achieve something
4 participants