Composablecatalogue.
Every origam composable is documented with its real TypeScript signature, parameters and return values — sourced directly from the DS source code.
147 composables across 32 domains
BROWSE BY DOMAIN
All composables.
Audio
useAudioPlayer
useAudioPlayer
Headless audio player composable. A typed wrapper around useMediaPlayer that exposes a typed `audioRef` (HTMLAudioElement) instead of the generic HTMLMediaElement, and reserves a stable extension point for future audio-specific features such as waveform analysis, Web Audio AnalyserNode wiring, and AudioWorklet pipes.
useWaveform
useWaveform
Headless waveform composable. Decodes the audio file referenced by a reactive URL ref, downsamples its channel-0 amplitude data into a configurable number of normalised peaks (default 200), and exposes the result as a reactive array. SSR-safe. Recomputes automatically when the source URL changes. Errors are captured reactively instead of thrown.
Chart
useChart
Stateless SVG chart engine powering <OrigamChart>. Computes every render-time descriptor needed for cartesian, polar, pie/donut, radar, bar, scatter, and stacked variants: viewBox, pixel-mapping scales, gridline ticks, per-series path/rect/circle descriptors, resolved legend entries, and an interactive hover state. Driven entirely by thunk options so it reacts to props, stores, or computed refs without re-instantiation.
useChartAnimationStyle
useChartGauge
Solid-gauge geometry engine for <OrigamChartGauge>. Given a value clamped between min and max, computes the SVG arc paths for the track (full arc background) and the indicator (partial arc proportional to the value), plus centre coordinates and radius values for the value label. Designed to mirror a speedometer-style gauge with a configurable sweep angle and thickness.
useChartHeaderTypography
useChartRoving
useChartSize
useChartZoom
Manages interactive zoom and pan state for OrigamChartCartesian. The zoom window is expressed as a closed [zoomStart, zoomEnd] range of category indices. Provides scroll-wheel zoom, drag-to-select zoom, and programmatic pan, all with clamping invariants.
Commons
useAccessibleCommand
useActivator
Wire an activator element (button, link, any DOM node) to an overlay component. Manages click, hover, focus, and context-menu open strategies, delay scheduling, and cursor-position targeting. Used internally by Menu, Tooltip, Dialog, and every component that needs a trigger-controlled overlay.
useActive
Tracks the active (pressed / selected) state of a host element with full v-model integration. Accepts boolean, forced-on (true) and IActiveState config objects with style overrides. The `prop` argument lets callers bind non-`active` keys (e.g. `modelValue`).
useAdjacent
Resolve the presence of prepend and append slots/icons for a component. Exposes computed flags (hasPrepend, hasAppend) that combine both the slot content and the icon/avatar props, plus click-event emitters for the clickable prepend/append areas. A companion composable useAdjacentInner handles the inner prepend/append surface (inside an input field).
useAdjacentInner
useAudio
Wire an <audio> element to the Web Audio API for frequency analysis and playback control. Tracks play/pause state, creates an AnalyserNode on first play to feed real-time frequency data (Uint8Array), and reacts to prop changes to reset playback when the audio source changes.
useBackButton
useBackdrop
useBackgroundColor
Surface-only color helper. Resolves the `bgColor` prop (or a reactive ref) to a utility class (`origam--bg-*`) when the value is a tokenised intent, or to an inline background-color declaration for raw CSS values.
useBorder
Resolves the `border` prop (boolean, width keyword, direction string or number) into utility classes and inline border declarations. Supports standalone borderColor and borderStyle props.
useBothColor
useColor
Resolve background and text colors from intent tokens or raw CSS values. Part of the classes-first strategy: tokenised intents emit utility classes, custom hex/rgb values emit inline styles.
useColorEffect
State-aware (hover / active / disabled) color resolution for components that paint a surface. Resolves bg and fg independently per state axis. Auto-contrasts foreground when only `bgColor` is set. Used by Btn, Card, Chip and ~49 other components.
useCreateLayout
useCssSupportClient
useDate
Injects the configured date adapter instance. Reads the date options provided by createOrigam() (or a parent OrigamDateProvider) and returns a ready-to-use adapter that abstracts all date arithmetic. Throws if called outside an app context where date options are not provided.
useDatePickerCalendar
Calendar computation layer for OrigamDatePicker. Derives all calendar display values (weeks, days, day metadata) from ICalendarProps in a reactive computed graph. Handles adjacent-month days, disabled states, selected ranges, week numbers and the static/dynamic weeks-in-month modes.
useDefaults
Component-side hook for the OrigamDefaultsProvider system. Returns a Proxy over the component's own props that resolves each value through a four-level chain: explicitly passed prop → component-specific defaults from the closest provider → global defaults from the closest provider → withDefaults() value.
useDelay
Manages open/close delay timing for overlay components. Reads openDelay and closeDelay from IDelayProps and exposes runOpenDelay / runCloseDelay helpers that debounce state transitions. Each new call cancels any in-flight delay, preventing race conditions when hover enters and leaves quickly.
useDensity
Emits the density modifier class (`compact`, `default`, `comfortable`) onto the root element. Component SCSS rules then pick up the matching density token to adjust spacing, padding and line-height without JS involvement.
useDimension
Resolves the six dimension props (width, height, minWidth, maxWidth, minHeight, maxHeight) into inline CSS declarations. Numbers become `px` values, strings pass through (supports CSS lengths, custom properties and aspect-ratio shortcuts).
useDisplay
Reactive display breakpoint detection. Returns the current viewport breakpoints, platform info, and a component-scoped mobile class. Must be consumed inside an app that has called createDisplay() during plugin setup.
useDragResizer
Attaches mouse and touch drag listeners to a DOM element so the user can resize a panel or split view. Clamps the resulting value between min and max, supports both horizontal (X) and vertical (Y) axes, and cleans up all event listeners on unmount.
useElevation
Maps the `elevation` prop to a `--origam-shadow-*` design token. Accepts origam rung names (none/xs/sm/md/lg/xl/2xl/3xl) or Material 0–24 integers. The bgColor parameter is deprecated and ignored since v2.5.
useEventListener
Registers one or more DOM event listeners on a target element (or window by default) and automatically removes them when the Vue scope is disposed. Supports reactive targets and options via watchers.
useFilter
Client-side filter engine for item lists. Applies a search query against one or more keys using the configured filter strategy (intersect, union, every, some). Supports custom per-key filter functions and a global custom filter override.
useFocus
Tracks the focus state of a form control and emits the v-model:focused update. Returns focus/blur event handlers and a component-scoped CSS class that is active while the element is focused.
useGoTo
Returns a scrollTo function that smoothly scrolls a container or the window to a target element, component instance, CSS selector, or numeric offset. Supports both vertical and horizontal scrolling, RTL awareness, and custom easing/duration options.
useGroup
Provides a reactive selection group that manages a list of registered items, single or multiple selection, mandatory enforcement, and max limit. Pairs with useGroupItem — the parent calls useGroup, each child calls useGroupItem.
useGroupItem
useGroupSiblingLink
useHotkey
Registers a global keyboard shortcut (single key, modifier combination, or multi-step sequence) and calls the provided callback on match. Automatically cleans up the event listener on component unmount. Supports reactive key strings via MaybeRef.
useHover
Tracks whether the host element is hovered via mouseenter/mouseleave events. Supports forced-on (hover=true) and IHoverState config objects for per-axis style overrides. Pairs with useColorEffect for theme-aware hover surfaces.
useHydration
Returns a shallow ref that is false during SSR and true once the component has mounted in the browser. In non-SSR mode it resolves immediately to true. Use it to guard client-only rendering branches without causing hydration mismatches.
useIntersectionObserver
Creates a reactive IntersectionObserver that tracks whether a bound element is intersecting the viewport. Returns a template ref to attach to the target element and a reactive boolean that flips when the element enters or leaves the visible area.
useItems
Normalises the polymorphic items prop accepted by list-based components (Select, Combobox, Autocomplete, List). Transforms raw item arrays into internal list item descriptors and provides bidirectional model value transformers (in from model, out to model) that respect returnObject mode and a custom value comparator.
useLayoutItem
useLayoutMain
Reads the nearest OrigamLayout context. Returns the layout item registry accessor, the reactive main content rectangle, and the computed CSS styles that push the main area aside to avoid overlap with fixed layout children (AppBar, Drawer, Footer, BottomNav). Throws if called outside an OrigamLayout provider.
useLazy
Controls whether a component's content has been booted into the DOM. Content is rendered on first activation and optionally destroyed when the component closes again (eager: false). Used by Dialog, Menu, Tooltip and any overlay that should avoid rendering markup before it is first opened.
useLink
useLoader
Resolves the polymorphic loading prop (boolean | number | TLoaderConfig) into a normalised descriptor used by the consuming component to mount the correct progress renderer (line, circular, or skeleton) with the correct props. Emits a BEM loading class while active.
useLocale
Injects the Origam locale instance created by createLocale() (or the vue-i18n adapter wired in createOrigam()). Provides the current locale ref, the RTL flag, and the translation function used by all internal DS components. Throws if called outside a createOrigam context.
useLocation
Converts a semantic anchor string (e.g. "top center", "bottom end") into CSS positioning styles for absolutely-placed elements. Used internally by Badge, Chip, and floating content components to position decorators relative to their host. Also exposes useLocationStrategies for the full popup positioning pipeline.
useLocationStrategies
useMargin
Resolves the `margin` shorthand prop into utility classes for spacing-scale steps (0–12) or inline margin declarations for custom values. Pass values as strings to opt into the scale ("4" → var(--origam-space---4)).
useMessage
Resolves the active message to display below a form field. Prioritises errorMessages and validation results over hint text, falling back to the explicit messages prop or the #message slot. Returns a boolean flag to conditionally render the message zone.
useNested
Manages a tree of selectable and openable items via provide/inject. Maintains a parent→child registry, applies a configurable open strategy (single / list / multiple) and a select strategy (classic / leaf / independent / single-leaf / single-independent). Used internally by OrigamTreeview, OrigamList, and OrigamExpansionPanels.
useNestedGroupActivator
useNestedItem
useOpacity
usePadding
Resolves the `padding` shorthand prop into utility classes for spacing-scale steps (0–12) or inline padding declarations for custom values. Mirror of useMargin for the padding axis.
usePassedProps
usePosition
Derives CSS positioning classes and inline style declarations from IPositionProps. Emits a BEM modifier class for the position variant (absolute, fixed, sticky, relative, static) and inline top/bottom/left/right properties for any offset props that are set.
useProps
Returns a filterProps utility that picks only the keys declared on a component interface from an arbitrary props object, stripping undefined values so that Vue 3 boolean-prop coercion does not silently override withDefaults in child components. Used by composite components (DataTable, List, Select…) to forward a safe subset of their own props to child Origam components.
useRefs
Manages a dynamic array of template refs that is reset before each update cycle. Provides an updateRef(el, i) callback designed for use with :ref in v-for loops, where Vue replaces individual refs by index. The refs array is always fresh (cleared in onBeforeUpdate) so stale elements from a previous render do not leak.
useResizeObserver
Wraps the native ResizeObserver API with a reactive template ref. Returns a resizeRef to attach to any element and a readonly contentRect that updates on every resize. Automatically disconnects the observer on component unmount. Supports both content-box (default) and border-box measurement.
useRounded
Resolves the `rounded` prop to border-radius classes and inline styles. Supports the modern utility taxonomy (xs/sm/md/lg/xl/none/full), the legacy named variants (x-small/small/default/medium/large/x-large/shaped), numbers and free-form CSS values.
useRoute
useRouter
Thin wrappers around Vue Router that expose the current route and router instance from the Vue component instance rather than via direct vue-router import. Also provides useLink (a link-resolution helper used by all clickable Origam components) and useBackButton (navigation guard for hardware/browser back button interception).
useRtl
useScopeId
Reads the Vue SFC scope ID from the current component instance and returns it as an attribute object. Used to ensure that teleported or dynamically-created DOM nodes receive the same scoped-CSS attribute as their parent component, so that scoped style rules continue to match across teleport boundaries.
useScroll
Tracks scroll position and direction on a configurable target element (or window). Returns reactive flags for scroll direction, activity state, threshold crossing, and a scroll ratio useful for progressive UI transitions. Also exposes useScrollStrategies (apply named scroll behaviours like block, close, or reposition to floating overlays) and useScrolling (keyboard + scroll helpers for virtualised list + search-field combos).
useScrollStrategies
useScrolling
useSelectLink
Bridges a router link and a group selection: when the link becomes active (current route matches), it automatically selects its group item. Used internally by navigation components (NavList, BottomNav, Tabs) so that a hard navigation or a programmatic router push keeps the selected state in sync without a manual v-model update.
useSize
Resolves the `size` prop to component-local modifier classes and optional width/height inline styles. Named presets (x-small/small/default/large/x-large) emit BEM modifier classes; custom values emit pixel dimensions.
useSsrBoot
Defers CSS transitions until after the first browser paint to prevent flash-of-transition on SSR hydration. Returns an isBooted flag (false during SSR and the first rAF frame, then true) and a ssrBootStyles computed that injects `transition: none !important` while booting, suppressing unwanted entry animations during hydration.
useStack
Manages z-index stacking order for overlay components (Dialog, Menu, Tooltip, Drawer, …). Registers the component in the global GLOBAL_STACK array when it becomes active and auto-computes a z-index 10 units above the current topmost overlay. Exposes globalTop (is this the topmost overlay worldwide?) and localTop (does this overlay have no active child overlays?) for pointer-event and close-on-outside-click decisions.
useStateEffect
Unified composable that consolidates eight visual axes (color, bgColor, border, rounded, elevation, padding, margin, gap) into a single state-aware layer. Reads the hover / active state and their override objects (IHoverState / IActiveState) and emits per-axis classes + styles for each axis. Replaces the prior chain of useColorEffect + useBorder + useRounded + useElevation + usePadding + useMargin that every visual component had to repeat.
useStateFlag
useStatus
Resolves semantic status props (success, info, warning, error) into icon slots, status classes, and a forced intent color. The status intent overrides any color / bgColor the consumer passed — a status colour is non-negotiable by design. Also manages icon routing across prepend / append / replace slots based on statusIconPosition.
useSticky
Implements the "sticky-while-scrolling" pattern for taller-than-viewport navigation drawers. Tracks scroll direction and element bounding rect to decide whether the sidebar is stuck at the top, stuck at the bottom, or free-floating mid-page. Returns stickyStyles with the appropriate top/bottom offset so the sidebar scrolls naturally through long content without jumping.
useStyle
Injects a dynamic <style> tag into document.head scoped to a generated element id, allowing components to apply per-instance CSS that cannot be expressed as inline styles (e.g. pseudo-element rules, :hover selectors, @keyframes). Also exposes the lower-level useStyleTag for raw CSS string injection. Both composables manage their own lifecycle: they load on mount and unload on scope dispose.
useStyleTag
useTeleport
Resolves the Vue Teleport target for overlay components. Accepts true (disable teleport — render inline), false (teleport to document.body), a CSS selector string (teleport to the matched element), or a raw Element. Creates an .origam-overlay-container div inside the target when one does not already exist, so multiple overlays sharing the same target stack correctly without polluting the host's direct children.
useTeleportTypography
useTextColor
Foreground-only color helper. Resolves the `color` prop to a utility class (`origam--color-*`) for tokenised intents, or to an inline `color:` declaration for raw CSS values and gradients.
useThrottleFn
Wraps a function so it executes at most once per wait milliseconds. The first call fires immediately; subsequent calls within the wait window are silently discarded. After the window expires the next call fires again immediately. Designed for scroll, resize, and pointer-move handlers where firing on every frame would be prohibitively expensive.
useToggleScope
Conditionally activates a Vue effectScope driven by a reactive boolean source. When the source turns true the scope starts (running the provided callback inside it); when it turns false the scope is stopped and discarded. The scope is also stopped on parent scope dispose.
useTouch
Enables swipe-to-open / swipe-to-close gesture handling for drawer-like components. Listens to touchstart / touchmove / touchend on window, computes drag progress relative to a positioned edge (left, right, top, bottom), and resolves the gesture via velocity-based fling detection using useVelocity.
useTypography
useUnsupportedProp
useVModel
Implements a controlled / uncontrolled prop contract for any component prop bound via v-model. When the parent provides both the prop and the matching onUpdate:prop listener the component operates in controlled mode; otherwise it manages its own internal ref. Supports kebab-case / camelCase prop alias pairs and optional in/out value transformers.
useValidation
Full validation engine for form field components. Runs async rule functions, accumulates error messages, tracks pristine / dirty / disabled / readonly states, and integrates with a parent OrigamForm (via ORIGAM_FORM_KEY injection) for coordinated validate / reset / resetValidation calls.
useVariant
Resolves a component variant value into a BEM modifier class. Accepts either a props object implementing IVariantProps or a direct reactive ref to the variant string. Returns a single computed array of class strings for binding.
useVelocity
Tracks touch-event samples per finger (identified by touch.identifier) in circular buffers and computes the instantaneous velocity vector at touchend via impulse-velocity analysis. Used by useTouch to decide whether a fling gesture is fast enough to open or close a drawer.
useVirtual
Virtual-scroll engine for large datasets. Maintains a dynamic window of visible items, computes per-item offsets via a debounced binary-search algorithm, tracks scroll velocity for predictive buffering, and exposes scrollToIndex with optional animated scrolling through useGoTo. SSR-safe — all DOM access is guarded.
DataTable
useCell
Resolve the padding for a DataTable cell based on the column definition. Special columns (data-table-select and data-table-expand) receive a fixed narrow padding; user-defined columns honour the column's own padding setting; all others receive the default undefined (letting CSS tokens drive the spacing).
useExpanded
Injects the expand context provided by provideExpanded() inside OrigamDataTable. Gives child components access to the expanded rows Set, expand/collapse handlers, and the expandOnClick flag — without prop-drilling.
useGroupedItems
useHeaders
Injects the DataTable header context created by createHeaders. Exposes the parsed multi-row header matrix, the flat column list, and the sort/filter function maps derived from the column definitions.
useHeadersCell
useOptions
Aggregates DataTable state (page, itemsPerPage, sortBy, groupBy, search) into a single reactive options object and emits update:options whenever any of those refs change. Also resets the page to 1 automatically when the search term changes. Used internally by OrigamDataTable.
usePaginatedItems
usePagination
Suite of three pagination helpers for OrigamDataTable: createPagination initialises page and itemsPerPage refs from props; providePagination computes derived state (startIndex, stopIndex, pageCount) and provides it to children; usePagination injects the provided pagination context. A fourth helper usePaginatedItems slices the items array for the current page.
useSelection
Inject accessor for the row-selection context provided by provideSelection inside OrigamDataTable. Returns the reactive selected Set and the select / toggleSelect / selectAll helpers plus status flags (someSelected, allSelected, showSelectAll). Used by checkbox columns and the header select-all control.
useSort
Inject accessor for the sort context provided by provideSort inside OrigamDataTable. Returns the reactive sortBy array and the toggleSort / isSorted helpers. Used by header cells to read and update the active sort columns. The companion useSortedItems applies the sort order to a reactive item list.
useSortedItems
Icon
List
Media
useMediaPlayer
Headless media player engine shared by useAudioPlayer and useVideoPlayer. Owns all HTMLMediaElement event bindings (play, pause, ended, timeupdate, progress, volumechange, loadedmetadata, loadstart, canplay, waiting, error, ratechange) plus the Remote Playback API (cast / AirPlay). Suppresses autoplay when prefers-reduced-motion is active.
useMediaPlayer
Parallax
useParallaxRuntime
Headless parallax engine used by OrigamParallax. Maintains a registry of layers, tracks scroll progress via IntersectionObserver, and drives per-frame transforms via requestAnimationFrame. Branches automatically to a CSS scroll-driven animation path (Chrome 115+) when the easing is linear and the browser supports animation-timeline: scroll(). Respects prefers-reduced-motion at OS level.
useParallaxTransform
Computes CSS transform strings for parallax layer elements based on normalised mouse-position coordinates. Supports five transform types: translate, rotate, depth (3-D tilt), depth-inv (inverted tilt), scale, scale-x, and scale-y. Consumed by OrigamParallax to animate child layers.
useParallaxTransform
Snackbar
useCountdown
Internal countdown timer used by OrigamSnackbar to drive the auto-dismiss progress indicator. Counts down from a given millisecond value using setInterval, ticking at the CSS transition duration of the host element so the progress bar remains visually synchronised. Exposes clear / reset / start controls and a reactive time ref.
useSnackbarGroup
Module-level singleton store for a named snackbar stack. Push notifications via notify(), dismiss them by id or all at once. Each call sharing the same id option reads and writes the same reactive items list — the composable and the matching <OrigamSnackbarGroup id="…"> component share live state with no event bus required.
useSnackbarGroupInternal
TextareaField
Theme
useInstalledThemes
Returns the static list of brand themes installed via createOrigam({ themes }). Each entry contains the brand name and the concrete modes it was installed for. Use this to build a theme switcher that stays in sync with whatever the app registered, without hard-coding available brand names.
useTheme
Module-level singleton managing the brand theme axis (data-theme attribute) and the color-mode axis (data-mode attribute). Persists both axes to localStorage and reacts to prefers-color-scheme. Every call to useTheme() shares the same refs.
Transition
useCssTransition
useTransition
Family of three composables (useTransition, useCssTransition, useWindowTransition) that resolve a transition name from ITransitionProps and wire optional lifecycle hooks. useCssTransition handles leaveAbsolute / hideOnLeave helpers. useWindowTransition coordinates height animations for window-based transitions in stepper or tab containers.
useWindowTransition