Item

Layout & Structure
stable

Renderless selection item that registers itself in an ItemGroup and exposes its selected state via the default slot.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamItemSchematic of the Item component with 2 numbered internal parts. #default slot — receives { isSelected, toggle, select, value, disabled } 1 2 origam-item
Anatomy of <origam-item> — 2 parts: the root element that carries the selected class, and the default slot that receives the group item state.
1.origam-item
Root element. Applies the selectedClass when the item is selected. Rendered as <div> by default (configurable via tag).
2.origam-item #default
Default slot. Receives { isSelected, selectedClass, toggle, select, value, disabled } so the consumer can wire any visual element to the selection state.

API

Props

All props accepted by this component, with their type, default value and description.

tag
string
'div'
HTML element rendered at the root.
value
any
The value this item represents. Used by ItemGroup to track selection via modelValue.
disabled
boolean
false
Prevents the item from being selected. The group still registers it but toggle() is a no-op.
selectedClass
string
CSS class applied to the root element when this item is selected. Overrides the group-level selectedClass.

API

Slots

Content slots exposed by this component.

#default
Default slot receiving the item state. isSelected (boolean), toggle () => void, select (value: boolean) => void, value (any), disabled (boolean).

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.
() => void
Toggles the item selection state. Equivalent to calling groupItem.toggle() from the default slot.
Ref<string>
Reactive CSS string generated by useStyle. Used by OrigamDefaultsProvider to inject styles.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document. Called automatically on mount.
() => void
Removes the injected style sheet. Called automatically on unmount.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Notes

  • OrigamItem is renderless — it applies no ARIA attributes itself. The consumer is responsible for adding role, aria-selected, aria-disabled and keyboard handling to the slot content.
  • Must be used inside an <origam-item-group>. Throws a runtime error otherwise.

Usage

Examples

Ready-to-paste code snippets for your templates.

Single-select group

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.