Skip to content

implement Dialog.Positioner #2798

@Newbie012

Description

@Newbie012

Feature request

Overview

Currently, implementing dialogs is quite intuitive. Although, when it comes to enter/exit animations, the styling of DialogContent becomes a bit cumbersome. I would like to suggest an option to pass Dialog.Positioner which allows easier implementation of animation presence.

import * as Dialog from '@radix-ui/react-dialog';

export default () => (
  <Dialog.Root>
    <Dialog.Trigger />
    <Dialog.Portal>
      <Dialog.Overlay />
+       <Dialog.Positioner>
          <Dialog.Content>
            <Dialog.Title />
            <Dialog.Description />
            <Dialog.Close />
          </Dialog.Content>
+       <Dialog.Positioner>
    </Dialog.Portal>
  </Dialog.Root>
);

Examples in other libraries

Ark UI's dialog primitive is almost identical to this library's Dialog. Their Positioner implementation looks great.

Who does this impact? Who is this for?

Anyone who wants a simplified way of animating dialog presence without tweaking transform origin / odd translation percentage.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions