Angular API Reference

Complete reference for @reelkit/angular components, directives, services, and utilities.

ReelComponent

Selector: rk-reel

Inputs

InputTypeDefaultDescription
countnumberrequiredTotal number of slides
direction'vertical' | 'horizontal''vertical'Scroll direction
size[number, number] | undefinedundefinedWidth and height as [width, height]. When omitted, auto-measures via ResizeObserver
initialIndexnumber0Starting slide index
loopbooleanfalseEnable infinite loop
transitionTransitionTransformFnslideTransitionTransition effect function. Built-in: slideTransition, fadeTransition, flipTransition, cubeTransition, zoomTransition
transitionDurationnumber300Animation duration in ms
swipeDistanceFactornumber0.12Swipe threshold (0-1)
enableGesturesbooleantrueEnable touch/mouse drag navigation
enableNavKeysbooleantrueEnable keyboard arrow key navigation
enableWheelbooleanfalseEnable mouse wheel navigation
wheelDebounceMsnumber200Wheel event debounce in ms
rangeExtractor(index: number, count: number) => number[]defaultRangeExtractorCustom function to determine which indexes are rendered
keyExtractor(index: number, indexInRange: number) => string | numberindex => indexCustom key function for @for track expressions (useful with loop)
classNamestring''CSS class applied to the root container element
ariaLabelstring'Carousel'Accessible label for the carousel region

Outputs

OutputTypeDescription
afterChangeEventEmitter<{ index: number; indexInRange: number }>Emitted after slide transition completes
beforeChangeEventEmitter<{ index: number; nextIndex: number; indexInRange: number }>Emitted before slide transition begins
slideDragStartEventEmitter<number>Emitted when a drag gesture starts
slideDragEndEventEmitter<number>Emitted when a drag gesture ends (released)
slideDragCanceledEventEmitter<number>Emitted when a drag gesture is canceled (snap-back)
apiReadyEventEmitter<ReelApi>Emitted once after view init, exposing the imperative API

ReelApi Interface

Obtained via the (apiReady) output:

typescript
MethodTypeDescription
next()() => voidGo to next slide
prev()() => voidGo to previous slide
goTo(index, animate?)(number, boolean?) => Promise<void>Navigate to a specific slide index
adjust()() => voidRecalculate slide positions (useful after layout change)
observe()() => voidStart listening to keyboard events
unobserve()() => voidStop listening to keyboard events

RkReelItemDirective

Selector: [rkReelItem] — Applied to an ng-template inside rk-reel.

Template Context

html
VariableTypeDescription
$implicit (let-i)numberAbsolute slide index (0 to count-1)
indexInRangenumberPosition in the visible window (0, 1, or 2)
size[number, number]Current slider dimensions as [width, height] in pixels

ReelIndicatorComponent

Selector: rk-reel-indicator

Inputs

InputTypeDefaultDescription
countnumber | undefinedautoTotal number of items. Auto-connected from parent rk-reel context when nested inside one; pass explicitly when used standalone
activenumber | undefinedautoCurrent active index. Auto-connected from parent rk-reel context when nested inside one; pass explicitly when used standalone
direction'vertical' | 'horizontal''vertical'Indicator orientation
radiusnumber3Dot radius in pixels
visiblenumber5Max normal-sized dots visible at once
gapnumber4Space between dots in pixels
activeColorstring'#fff'Active dot color
inactiveColorstring'rgba(255,255,255,0.5)'Inactive dot color
edgeScalenumber0.5Scale factor for edge overflow dots
classNamestring''Custom CSS class applied to the indicator container
tablistLabelstring'Slide navigation'Accessible label for the tablist landmark

Outputs

OutputTypeDescription
dotClickEventEmitter<number>Emitted when a dot is clicked; provides the dot index

RK_REEL_CONTEXT

An InjectionToken<ReelContextValue> provided by rk-reel to its descendants. Used internally by rk-reel-indicator for auto-connect behavior. Inject it in custom components that need slider context.

typescript
PropertyTypeDescription
indexSignal<number>Reactive current slide index
countSignal<number>Reactive total item count
goTo(index: number, animate?: boolean) => Promise<void>Programmatically navigate to a slide

BodyLockService

Reference-counted body scroll lock. Multiple concurrent callers (e.g. a lightbox and a modal both open) can each call lock/unlock independently — the body is only restored once the last caller releases it. Provided at root — inject anywhere.

typescript
MemberTypeDescription
lockedboolean (getter)Whether the body is currently locked
lock()() => voidLock body scroll and apply scrollbar width compensation
unlock()() => voidRestore original body scroll styles

Signal Bridge Utilities

Utility functions that bridge the core signal system (@reelkit/core) with Angular's native signal API. Used internally by ReelComponent; also available for custom framework integrations.

FunctionSignatureDescription
toAngularSignal(source: Subscribable<T>, destroyRef: DestroyRef) => Signal<T>Bridges a core Subscribable into a read-only Angular Signal
animatedSignalBridge(source: AnimatedValue, zone: NgZone, cdRef: ChangeDetectorRef, destroyRef: DestroyRef) => Signal<number>Bridges a core animated value into an Angular Signal, updating via requestAnimationFrame outside the zone
typescript

Accessibility

<rk-reel> renders as role="region" with aria-roledescription="carousel". Set the ariaLabel input to give the region a screen-reader name. A polite live region announces "Slide N of M" on every slide change. Inactive slides receive the inert attribute so focus and AT navigation skip them.

<rk-reel-indicator> renders as role="tablist" with roving tabindex on the dots; arrow keys move focus and Enter or Space activates the slide.

Building a custom modal around <rk-reel>? captureFocusForReturn, createFocusTrap, and getFocusableElements are re-exported from @reelkit/angular for focus return and trap.

Package Exports

All public exports from @reelkit/angular:

typescript