Skip to content

TicFrame v5.7.0-alpha.1 is available - read the changelog.

TicFrame

Components

Carousel

Carousel reference for TicFrame components, covering usage, accessibility, responsive behavior, dark mode, RTL, source examples, and production guidance.

Requirements

Carousel is implemented with semantic HTML, TicFrame classes, design tokens, responsive utilities, and documented data attributes. It does not require website-specific CSS.

Use the tf-* namespace consistently so the class validator can prove every visual dependency ships from TicFrame.

Usage Guidance

Start with the semantic element, add the matching TicFrame component or utility classes, and use data attributes only for behavior that TicFrame documents. Keep labels, headings, and landmarks visible to assistive technology.

Mobile-first utilities such as md:tf-grid-cols-3 scale the layout.

Colors resolve through data-tf-theme and semantic tokens.

Logical spacing and direction-aware JS keep the component mirrored safely.

Live Example

HTML
<div id="sample-carousel" class="tf-carousel" data-tf-carousel aria-label="Feature carousel"><article class="tf-card"><div class="tf-card-body">Slide one</div></article><article class="tf-card"><div class="tf-card-body">Slide two</div></article></div>
<div class="tf-flex tf-gap-2 tf-mt-3"><button type="button" class="tf-btn tf-btn-sm" data-tf-carousel-target="#sample-carousel" data-tf-carousel-action="previous">Previous</button><button type="button" class="tf-btn tf-btn-sm" data-tf-carousel-target="#sample-carousel" data-tf-carousel-action="next">Next</button></div>

Reference

AreaContract
Classestf-container, tf-card, tf-btn, and feature-specific tf-* classes.
AccessibilityKeyboard access, visible focus, associated labels, ARIA only where native HTML needs support.
JavaScriptAutomatic initialization through TicFrame.init() and the documented data API.
Tokens--tf-color-*, --tf-space-*, --tf-radius-*, and --tf-shadow-*.