npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ontech7/react-native-dialog

v1.3.0

Published

Simple and lightweight dialog component for React Native, structure similar to shadcn/ui, with dimezis background blur. Compatible with Android & iOS.

Readme

react-native-dialog

platforms runs with expo npm npm npm

Simple and lightweight dialog component for React Native, structure similar to shadcn/ui, with dimezis background blur. Compatible with Android & iOS.

Features:

  • Compatible with Expo SDK >= 49 and bare projects
  • shadcn/ui approach, with fully customizable components
  • Possibility to change global styles from the DialogProvider
  • Light & dark mode theming, with built-in shadcnStyle and materialStyle presets
  • Portalized pupup/dialog
  • Modifiable duration (default: 200)
  • Modifiable tint dark/light (default: dark)
  • Modifiable slide-in animation (default: none)
  • Possibility to add blur layer with BlurComponent prop

Showcase

| No Slide | Slide-in | | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | | default | slide | | Input | Global Custom Styles | | input | custom |

Custom themes / styles

import {
  DialogProvider,
  shadcnStyle
} from "@ontech7/react-native-dialog";

export default function RootLayout() {
  return (
    <DialogProvider customStyles={shadcnStyle}>
      {/* ... rest of the code here ... */}
    </DialogProvider>
  )
}

Two presets ship out of the box, each as a { light, dark } theme: shadcnStyle (matches the shadcn/ui Dialog) and materialStyle (Material Design 3).

Dark mode

customStyles accepts either a single DialogStyleConfig (light only, as before) or a { light, dark } theme. All built-in presets are themes. The active variant is chosen by colorScheme, which defaults to "light" — you decide what drives dark mode (the OS, or your own in-app toggle):

import { useColorScheme } from "react-native";
import { DialogProvider, shadcnStyle } from "@ontech7/react-native-dialog";

// follow the OS appearance
const scheme = useColorScheme(); // "light" | "dark"
<DialogProvider customStyles={shadcnStyle} colorScheme={scheme ?? "light"}>
  {/* ... */}
</DialogProvider>;

// or follow an in-app theme toggle
<DialogProvider customStyles={shadcnStyle} colorScheme={isDark ? "dark" : "light"}>
  {/* ... */}
</DialogProvider>;

Without colorScheme, the light variant is used. You can also define your own styles, either as a theme or via the separate darkStyles prop:

<DialogProvider
  customStyles={myLightStyles}
  darkStyles={myDarkStyles}
  colorScheme={isDark ? "dark" : "light"}
>
  {/* ... */}
</DialogProvider>

Usage

$ yarn add @ontech7/react-native-dialog
# or
$ npm install @ontech7/react-native-dialog
# or
$ pnpm add @ontech7/react-native-dialog

You need to import the DialogProvider and put it in your App.js or root _layout.tsx component.

// _layout.tsx
import { DialogProvider } from "@ontech7/react-native-dialog";

export default function RootLayout() {
  return (
    <DialogProvider>
      {/* ... rest of the code here ... */}
    </DialogProvider>
  )
}

[!IMPORTANT] Mount DialogProvider at a full-screen root (your App.tsx / root _layout.tsx). The dialog overlay is rendered in-tree relative to the provider, so its parent must fill the screen and must not be transformed or clipped (overflow: "hidden"). On React Native's New Architecture (RN 0.85+ / Expo SDK 56) a parent that collapses to zero size will make the backdrop disappear. Avoid wrapping DialogProvider in a sized/transformed container.

// Component.tsx
import { useState, useCallback } from "react";

import {
  Dialog,
  DialogAction,
  DialogHeader,
  DialogFooter,
  DialogTitle,
  DialogDescription,
  type DialogProps,
} from "@ontech7/react-native-dialog";

export default function Component(props: DialogProps) {
  const [open, setOpen] = useState(false);

  const handleOpen = useCallback(() => setOpen(true), []);
  const handleClose = useCallback(() => setOpen(false), []);

  return (
    <Dialog open={open} {...props}>
      <DialogHeader>
        <DialogTitle>Attention!</DialogTitle>
        <DialogDescription>
          This is a dialog.{"\n"}Please click one of the buttons below to close
          it.
        </DialogDescription>
      </DialogHeader>
      <DialogFooter>
        <DialogAction onPress={handleClose}>Close</DialogAction>
        <DialogAction onPress={handleClose}>Confirm</DialogAction>
      </DialogFooter>
    </Dialog>
  );
}

Blur Component

It's possible to add blur component to Dialog, such as expo-blur, @react-native-community/blur or @sbaiahmed1/react-native-blur.

By defalt it has a 25% intensity and a downsample factor of 8. They should be enough and not so much expensive on hardware acceleration.

import { BlurView } from "@sbaiahmed1/react-native-blur";

export default function Component(props) {
  return (
    <Dialog BlurComponent={BlurView} {...props}>
      {/* ... code here ... */}
    </Dialog>
  );
}

Use blurProps to forward (and override) props on your BlurComponent. This is how you configure blur per SDK without the library guessing. For example, with expo-blur on Expo SDK 56 the Android native blur needs the new blurMethod + blurTarget API:

import { BlurView } from "expo-blur";

<Dialog
  BlurComponent={BlurView}
  blurProps={{ blurMethod: "dimezisBlurView", blurTarget }}
  {...props}
/>;

[!NOTE] The library no longer forces experimentalBlurMethod="dimezisBlurView", which was deprecated in SDK 56 and now requires a blurTarget. On iOS the default blur works out of the box; for Android blur, opt in via blurProps.

blur

Props

DialogProvider

| Name | Description | | ------------ | -------------------------------------------------------------------------------------------------------------------- | | customStyles | Global styles for all components. A DialogStyleConfig (light only) or a { light, dark } theme (e.g. shadcnStyle) | | darkStyles | Styles applied when the active scheme is dark (when customStyles is a single config). Falls back to the light ones | | colorScheme | Active scheme: light or dark. Defaults to light — drive it from useColorScheme() or your in-app theme toggle |

Dialog

| Name | Description | | --------------- | ------------------------------------------------------------------------------------------------------------------ | | open | Show/hide dialog (default: true) | | onPressOut | Add callback when pressing out of the dialog | | tint | Backdrop background color. Possible values: light, dark (default: dark) | | animation | Enable or disable animations (default: true) | | duration | Duration of the animations (default: 200) | | delay | Delay when opening the dialog (default: 0) | | slideFrom | Animation slide-in. Possible values: none, bottom, top, left, right, center. (default: none) | | BlurComponent | Possibility to add BlurView such as expo-blur, @react-native-community/blur or @sbaiahmed1/react-native-blur | | blurProps | Props forwarded to (and overriding the defaults on) BlurComponent, e.g. { blurMethod: "dimezisBlurView", blurTarget } on Expo SDK 56 expo-blur | | overlayColor | Scrim color over the backdrop (and over the blur, if any). Defaults from tint; e.g. rgba(0,0,0,0.5) for a darker overlay behind a blurred dialog |


Example

Here are simple examples:


Credits

Written by Andrea Losavio.