You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| flipKey **(required)**| - |`string`, `number`, `bool`| Changing this tells `react-flip-toolkit` to transition child elements wrapped in `Flipped` components. |
296
296
| children **(required)**| - |`node`| One or more element children |
297
-
| spring |`noWobble`|`string` or `object`| Provide a string referencing one of the spring presets —`noWobble` (default), `veryGentle`, `gentle`, `wobbly`, or `stiff`, OR provide an object with stiffness and damping parameters. [Explore the spring setting options here.](https://codepen.io/aholachek/full/bKmZbV/) The prop provided here will be the spring default that can be overrided on a per-element basis on the `Flipped` component. |
297
+
| spring |`noWobble`|`string` or `object`| Provide a string referencing one of the spring presets —`noWobble` (default), `veryGentle`, `gentle`, `wobbly`, or `stiff`, OR provide an object with stiffness and damping parameters. [Explore the spring setting options here.](https://codesandbox.io/s/react-flip-toolkit-spring-settings-explorer-vjrsh). The prop provided here will be the spring default that can be overrided on a per-element basis on the `Flipped` component. |
298
298
| applyTransformOrigin |`true`|`bool`| Whether or not `react-flip-toolkit` should apply a transform-origin of "0 0" to animating children (this is generally, but not always, desirable for FLIP animations) |
299
299
| element |`div`|`string`| If you'd like the wrapper element created by the `Flipped` container to be something other than a `div`, you can specify that here. |
300
300
| className | - |`string`| A class applied to the wrapper element, helpful for styling. |
Copy file name to clipboardExpand all lines: packages/flip-toolkit/src/types.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -102,17 +102,22 @@ export type OnFlipperStart = (
102
102
)=>void
103
103
104
104
exportinterfaceFlipperProps{
105
+
/** Changing this key will initiate a FLIP animation */
105
106
flipKey: any
106
107
children: React.ReactNode
107
-
/** Provide a string referencing one of the spring presets — noWobble (default), veryGentle, gentle, wobbly, or stiff, OR provide an object with stiffness and damping parameters. */
108
+
/** Provide a string referencing one of the spring presets — noWobble (default), veryGentle, gentle, wobbly, or stiff, OR provide an object with stiffness and damping parameters. Explore all spring options here: https://codesandbox.io/s/react-flip-toolkit-spring-settings-explorer-vjrsh */
108
109
spring?: SpringOption
110
+
/** Whether or not react-flip-toolkit should apply a transform-origin of "0 0" to animating children (this is generally desirable for FLIP animations, and is set to true by default). */
109
111
applyTransformOrigin?: boolean
110
112
/** This experimental prop will pause your animation right at the initial application of FLIP-ped styles. That will allow you to inspect the state of the animation at the very beginning, when it should look similar or identical to the UI before the animation began. */
111
113
debug?: boolean
114
+
/** If you'd like to render an element other than `div`, specify an element string here */
112
115
element?: string
116
+
/** A classname to pass down to the element rendered by the Flipper component */
113
117
className?: string
114
118
/** In general, the Flipper component will only apply transitions to its descendents. This allows multiple Flipper elements to coexist on the same page, but it will prevent animations from working if you use portals. You can provide a unique portalKey prop to Flipper to tell it to scope element selections to the entire document, not just to its children, so that elements in portals can be transitioned. */
115
119
portalKey?: string
120
+
/** Configure the stagger settings for elements that will have stagger delays on their animations. More information in the docs: https://github.com/aholachek/react-flip-toolkit#basic-props */
116
121
staggerConfig?: StaggerConfig
117
122
/** Sometimes, you'll want the animated children of Flipper to behave differently depending on the state transition — maybe only certain Flipped elements should animate in response to a particular change. By providing the decisionData prop to the Flipper component, you'll make that data available to the shouldFlip and shouldInvert methods of each child Flipped component, so they can decided for themselves whether to animate or not. */
0 commit comments