IStateEffectConfig

interface
Behaviour

Shared shape for state-aware visual overrides (hover, active). When passed as an object to the hover or active prop, its keys override the corresponding resting props only while the state is engaged.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

enabled
boolean
Force the state on regardless of mouse / pointer events. Useful for controlled hover toggled by parent state.
color
TColor
Foreground (text / icon) colour override while the state is engaged.
bgColor
TColor
Surface background colour override while the state is engaged.
border
IBorderProps['border']
Border width / style / direction override while the state is engaged.
borderColor
IBorderProps['borderColor']
rounded
IRoundedProps['rounded']
Corner radius override while the state is engaged.
elevation
IElevationProps['elevation']
Box-shadow elevation override while the state is engaged.
padding
IPaddingProps['padding']
Padding scalar override while the state is engaged. Per-axis padding is not supported in state overrides.
margin
IMarginProps['margin']
Margin scalar override while the state is engaged.
gap
boolean | number | string
Flex/grid gap override while the state is engaged. Consumed by components that expose a gap prop.
opacity
IOpacityProps['opacity']

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Using hover and active overrides on OrigamCard

html