MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / CarouselNext

Function CarouselNext

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

Source from the content-addressed store, hash-verified

191}
192
193function CarouselNext({
194 className,
195 variant = "outline",
196 size = "icon",
197 ...props
198}: React.ComponentProps<typeof Button>) {
199 const { orientation, scrollNext, canScrollNext } = useCarousel();
200
201 return (
202 <Button
203 data-slot="carousel-next"
204 variant={variant}
205 size={size}
206 className={cn(
207 "absolute size-8 rounded-full",
208 orientation === "horizontal"
209 ? "top-1/2 -right-12 -translate-y-1/2"
210 : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
211 className,
212 )}
213 disabled={!canScrollNext}
214 onClick={scrollNext}
215 {...props}
216 >
217 <ArrowRight />
218 <span className="sr-only">Next slide</span>
219 </Button>
220 );
221}
222
223export {
224 type CarouselApi,

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useCarouselFunction · 0.85

Tested by

no test coverage detected