TwitterGithub

Carousel

A carousel with motion and swipe built using Embla.

1

2

3

4

5

Installation

npx nx g @spartan-ng/cli:ui carousel

Usage

import { HlmCarouselComponent, HlmCarouselContentComponent,HlmCarouselItemComponent,HlmCarouselNextComponent,HlmCarouselPreviousComponent } from '@spartan-ng/ui-carousel-helm';
<hlm-carousel>
  <hlm-carousel-content>
    <hlm-carousel-item>
      Item Content
    </hlm-carousel-item>
  </hlm-carousel-content>
  <button hlm-carousel-previous></button>
  <button hlm-carousel-next></button>
</hlm-carousel>

Examples

Sizes

The size of the items can be set by using the basis utility class on the hlm-carousel-item .

1

2

3

4

5

Spacing

The spacing between the items can be set by using a p-[VALUE] utility on the hlm-carousel-item and a negative -ml-[VALUE] on the hlm-carousel-content .

1

2

3

4

5

Orientation

The orientation prop can be used to set the orientation of the carousel.

1

2

3

4

5

Plugins

You can use the plugins plugins prop to add plugins to the carousel.

1

2

3

4

5

See the Embla Carousel docs for more information on using plugins.

Checkbox Card