CarouselItem
A single slide inside OrigamCarousel — wraps OrigamWindowItem and OrigamImg, forwarding all image and window-item props.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-carousel-item> — 3 internal parts. The root delegates to OrigamWindowItem; the image fills the inherited height.- 1.origam-carousel-item
- Root element. Delegates to OrigamWindowItem and inherits height from the parent Carousel.
- 2origam-img (embedded)
- OrigamImg instance filling the slide area. Props (src, cover, alt, srcset, eager…) are forwarded automatically. Skipped when the default slot is used.
- 3#content slot
- Projected into OrigamImg's default slot. Use for overlay captions, badges, or action buttons positioned over the image.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- transitionboolean | string
- Slide-in transition name or false to disable. Forwarded to OrigamWindowItem.
- altstring
- Alt text for the embedded image. Required for accessibility when src is set.
- coverbooleanfalse
- Passes object-fit: cover to OrigamImg so the image fills the slide without distortion.
- draggableboolean
- gradientstring
- lazySrcstring
- optionsIIntersectionObserverInit
- sizesstring
- srcstring | ISrcObject
- Image URL. Forwarded to OrigamImg. When omitted, the default slot fills the slide area.
- crossoriginTCrossOrigin
- referrerpolicyTReferrerPolicy
- srcsetstring
- Responsive image srcset. Forwarded to OrigamImg.
- positionstring
- colorTColor
- bgColorTColor
- aspectRatiostring | number
- contentClassstring
- heightnumber | string
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- Inline styles forwarded to the root OrigamWindowItem element.
- tagstring
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- roundedboolean | number | string | TRounded | null | undefined
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- eagerbooleanfalse
- Loads the image immediately instead of using IntersectionObserver lazy loading.
- reverseTransitionboolean | string
- Reverse (slide-out) transition. Forwarded to OrigamWindowItem.
- valueany
- Model value used by OrigamWindow to identify the active slide.
- disabledbooleanfalse
- Prevents this slide from being selected.
- selectedClassstring
API
Slots
Emplacements de contenu exposés par ce composant.
- #default
- Full slide content. When used, the embedded OrigamImg is replaced entirely by this slot.
- #content
- Projected into the OrigamImg default slot — renders on top of the image (overlay text, badges, etc.).
- #error
- Shown inside OrigamImg when the image fails to load.
- #placeholder
- Shown inside OrigamImg while the image is still loading.
API
Membres exposés
Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Utility to forward a filtered subset of props to a child component (OrigamImg or OrigamWindowItem).
- Ref<string>
- Reactive CSS string generated by useStyle for the carousel item.
- string
- Unique style-sheet ID for this instance.
- () => void
- Injects the computed style sheet into the document.
- () => void
- Removes the injected style sheet.
- Ref<boolean>
- True once the style sheet has been injected into the DOM.
Personnalisation
Variables CSS
Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.
- Display mode of the root element.
- Height inherited from the parent Carousel container.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Interactions clavier
| Touche | Action |
|---|---|
| Tab | Focus moves to interactive content inside the slide (links, buttons, form elements). |
Notes
- When src is set, always provide a meaningful alt attribute. An empty alt="" is acceptable for purely decorative images.
- Inactive slides are hidden from the accessibility tree by OrigamWindowItem (aria-hidden="true") — only the active slide is reachable by keyboard and screen readers.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Basic slide with image
Custom slide content
Loading placeholder
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.