Skip to content

Unable to set defaultOpen with snapPoints #104

Open

Description

@statusunknown418

The snappoints are preventing the drawer from rendering also it's not working with defaultOpen

demo:

Screen.Recording.2025-05-02.at.12.12.33.mov

code:

  const [snap, setSnap] = useState<number | string | null>(snapPoints[0]);

...
{isMobile && (
        <Drawer setActiveSnapPoint={setSnap} activeSnapPoint={snap} snapPoints={snapPoints}>
          <DrawerTrigger asChild>
            <Button>Open</Button>
          </DrawerTrigger>
          <DrawerContent>
            <DrawerHeader>
              <DrawerTitle>Sign In</DrawerTitle>
            </DrawerHeader>

            <section>Something</section>
          </DrawerContent>
        </Drawer>
      )}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions