CarouselItem
A single slide inside OrigamCarousel — wraps OrigamWindowItem and OrigamImg, forwarding all image and window-item props.
Structure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and 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
Content slots exposed by this component.
- #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
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- Display mode of the root element.
- Height inherited from the parent Carousel container.
Inclusion
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
Keyboard interactions
| Key | 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.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic slide with image
Custom slide content
Loading placeholder
Ecosystem
Family
Components from the same folder that share conventions and often compose together.