Import

import-carousel.ts
import { NuiCarousel, NuiCarouselSlide } from '@needless-ui/angular/carousel';

NuiCarousel

A carousel of slides.

Selector
nui-carousel
NuiCarousel: Properties
NameTypeDefaultDescription
labelInputstringNames the carousel.
indexTwo-waynumber0The first slide in view, from 0.
perViewInputnumber | 'auto'1Slides in view at once, or auto for slides that set their own width.
gapInputstring'1rem'Room between slides, as any CSS length.
loopInputbooleanfalseGoing past the last slide comes back to the first, and the other way round.
autoplayInputnumber (ms)0Milliseconds between slides when it turns by itself; 0 doesn’t.
controls, indicatorsInputbooleantrueThe previous and next buttons, and the dots.
labelsInputPartial<NuiCarouselLabels>Every text it says, to translate.
next, previousMethod() => voidMoves one slide on or back.
goToMethod(index: number) => voidBrings a slide into view.

NuiCarouselSlide

A slide.

Selector
[nuiCarouselSlide]
NuiCarouselSlide: Properties
NameTypeDefaultDescription
nuiCarouselSlideInputstringIts title, read instead of its position.