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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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']

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Using hover and active overrides on OrigamCard

html