MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / CarouselNext

Function CarouselNext

src/components/ui/carousel.tsx:204–232  ·  view source on GitHub ↗
({
  className,
  variant = "outline",
  size = "icon",
  ...props
}: React.ComponentProps<typeof Button>)

Source from the content-addressed store, hash-verified

202}
203
204function CarouselNext({
205 className,
206 variant = "outline",
207 size = "icon",
208 ...props
209}: React.ComponentProps<typeof Button>) {
210 const { orientation, scrollNext, canScrollNext } = useCarousel()
211
212 return (
213 <Button
214 data-slot="carousel-next"
215 variant={variant}
216 size={size}
217 className={cn(
218 "absolute size-8 rounded-full",
219 orientation === "horizontal"
220 ? "top-1/2 -right-12 -translate-y-1/2"
221 : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
222 className
223 )}
224 disabled={!canScrollNext}
225 onClick={scrollNext}
226 {...props}
227 >
228 <ArrowRight />
229 <span className="sr-only">Next slide</span>
230 </Button>
231 )
232}
233
234export {
235 type CarouselApi,

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useCarouselFunction · 0.85

Tested by

no test coverage detected