Replies: 3 comments 1 reply
-
Thanks for bringing this to our attention. In fact we are just on the hunt to finalize the component API for animating and lazy mounting components. That's what we have at the moment: <Dialog>
<DialogTrigger className={triggerClass()}>open</DialogTrigger>
<Portal>
<DialogPresence>
<DialogOverlay />
</DialogPresence>
<DialogPresence lazyMount={true|false} unmountOnExit={true|false} onExitComplete={() => {}}>
<DialogContent>
<DialogTitle>Title</DialogTitle>
<DialogDescription>
Description
</DialogDescription>
</DialogContent>
</DialogPresence>
</Portal>
</Dialog> This kind of component type will be available for all disclosure type components like Type definition for reference: type PresenceProps = {
/**
* @default false
*/
unmountOnExit: boolean
/**
* @default false
*/
lazyMount: boolean // or deferMount: boolean
} Please see #1155 |
Beta Was this translation helpful? Give feedback.
-
Following up here after playing with Ark a bit more. This is good progress and makes sense. I've been having some success with tooltips and such. However, there is still the question of Accordions which I think are unique because they need to be aware of the height/width of their contents. Any plans to support that? |
Beta Was this translation helpful? Give feedback.
-
I have a simple animation running but it is not perfect https://park-ui.com/docs/components/accordion |
Beta Was this translation helpful? Give feedback.
-
Is there a way to animate the accordion opening and closing? Radix exposes height/width variables, for example, to make it easy to access the inner height/width of the accordion contents. But I don't see any way to access those values from the docs
Updating this question to be more inclusive of enter/exit animations in general. In addition to context (like "height" or "width") specific variables, it would be nice to have access to other attributes that would enable easier animations. Presently,
enter
animations are easy, butexit
animations are not possible (as far as Im aware) because components arehidden
immediately when closed.As an example, React Aria exposes a property and data attribute (
data-entering
ordata-exiting
) that makes it easy to attach enter or exit animations.Beta Was this translation helpful? Give feedback.
All reactions