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