Skip to content

Context Provider - Implement AnimationContextProvider #11962

@jenny-s51

Description

@jenny-s51

Description of Problem

PatternFly components require manual hasAnimations prop on opt-in components.

Solution

Add AnimationContextProvider to centralize animation control across all PatternFly components with animations.

API Design

// Provider setup
<AnimationContextProvider>
  <App />
</AnimationContextProvider>

// Components automatically inherit animation state
<Table />        {/* No manual hasAnimations prop needed */}
<AlertGroup />   {/* Automatically gets context animations */}

// Hook for custom components
const { hasAnimations } = useAnimations();

Acceptance Criteria

  • AnimationContextProvider exported from @patternfly/react-core
  • useAnimations() hook for accessing animation state
  • All existing animated components use context when hasAnimations prop not provided
  • TS support and documentation

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

PR Review

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions