Skip to content

How should i use Carousel pcPrevButton and pcNextButton Pass Through to manipulate the styling? #3069

Answered by j0rgedev
TaduJR asked this question in PrimeVue
Discussion options

You must be logged in to vote

Hello @TaduJR. Your PT doesn't works because both pcprev and pcnext are button components, so you'll have to pass the correct button PT object to make it work, otherwise it won't. Here is the fixed component:

    <Carousel
      v-if="product && product.image_urls"
      class="mt-2"
      :value="product.image_urls"
      :numVisible="3"
      :numScroll="3"
      :responsiveOptions="carouselResponsiveOptions"
      :showIndicators="false"
      :pt="{
        pcPrevButton: {
          root: {
            class: 'bottom-0',
          },
        },
        pcNextButton: {
          root: {
            class: 'bottom-0',
          },
        },
      }"
    >
      ...
    </Carousel>

By t…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by TaduJR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants