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.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- enabledboolean
- Force the state on regardless of mouse / pointer events. Useful for controlled hover toggled by parent state.
- colorTColor
- Foreground (text / icon) colour override while the state is engaged.
- bgColorTColor
- Surface background colour override while the state is engaged.
- borderIBorderProps['border']
- Border width / style / direction override while the state is engaged.
- borderColorIBorderProps['borderColor']
- roundedIRoundedProps['rounded']
- Corner radius override while the state is engaged.
- elevationIElevationProps['elevation']
- Box-shadow elevation override while the state is engaged.
- paddingIPaddingProps['padding']
- Padding scalar override while the state is engaged. Per-axis padding is not supported in state overrides.
- marginIMarginProps['margin']
- Margin scalar override while the state is engaged.
- gapboolean | number | string
- Flex/grid gap override while the state is engaged. Consumed by components that expose a gap prop.
- opacityIOpacityProps['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