Bonusway design system

Navigation

Carousel

A rotating banner — the home page promos. Auto-advances, pauses on hover and focus, and every label is a prop because this component predates the page being localized and must not ship English into eleven markets.

import Carousel from '@/components/ui/Carousel';

Source: src/components/ui/Carousel.tsx

Examples

Slides with indicators

Arrows are hidden below sm and swipe takes over: on a 98px-tall phone banner the arrows covered the content they were meant to reveal. Narrow the stage to 375px above and drag a slide to see it.

interactive
First promotion

Props

<Carousel> props

PropTypeDefaultDescription
slidesrequiredCarouselSlide[]——
autoPlayIntervalnumber5000—
aspectRatiostring'990 / 290'

Reserved width/height ratio (CSS aspect-ratio), so the page doesn't shift when the images arrive. Defaults to the live banner size, 990×290.

classNamestring''—
previousLabelstring'Previous slide'—
nextLabelstring'Next slide'—
slideLabelstring'Slide {n}'—
pauseLabelstring'Pause slide rotation'—
resumeLabelstring'Resume slide rotation'—

Accessibility

  • Auto-rotation pauses on hover and on focus, and there is an explicit pause control — an animation the user cannot stop is a WCAG failure.
  • Indicators are buttons labelled with their slide number via `slideLabel`, where `{n}` is substituted.

Usage

Do

  • Pass every label from your translations. The defaults are English and exist only so the component can be rendered in this catalog.
  • Set aspectRatio to the real banner ratio, so the space is reserved before the images load.

Don’t

  • Don’t put anything important on slide two or later. Most people see the first slide and nothing else.
  • Don’t use it as a layout for content that should all be visible.

Related:Tabs

Az oldal sütiket használ

Sütiket használunk, hogy a felhasználói élményedet jobbá tegyük és személyre szabott tartalmat mutathassunk. A létfontosságú sütik teszik lehetővé, hogy a szolgáltatásunk működjön számodra. Amennyiben egyetértesz, hogy információt gyűjtünk rólad a létfontosságú és marketing sütik segítségével, akkor kattints az "Összes süti elfogadására". Bármikor megváltoztathatod a beállításaidat, a "Süti beállításra" látogatva.

Sütik beállítása