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

@joyfill/components-react-native

v1.0.0

Published

Joyfill React Native Components

Readme

@joyfill/components-react-native

We recommend visiting our official react-native setup guide https://docs.joyfill.io/docs/react-native.

Project Requirements

  • React 19
  • React Native 0.86.x with the New Architecture enabled
  • Expo SDK 57 (Expo applications only)
  • Node 22.13+ within Node 22, or Node 24.3+

Install Dependency

Keep your existing dependencies when they satisfy the SDK's peer dependency ranges and your application's framework requirements. Install only missing packages, and change existing versions only to resolve a compatibility conflict. All required native peers must be present, even if your forms use only a subset of field types.

Before installing, compare your app's installed versions with the release's declared ranges:

npm view @joyfill/[email protected] peerDependencies
npm ls react react-native react-native-webview react-native-svg \
  @react-native-community/datetimepicker react-native-gesture-handler \
  react-native-reanimated react-native-worklets

Run installation commands in your application directory and keep using your existing package manager and lockfile. A version outside the declared ranges needs a compatibility review; the ranges alone do not establish that a full application migration is necessary.

React-Native CLI (bare)

Keep your existing React and React Native versions if they satisfy the declared ranges. If a framework upgrade is needed, follow the React Native upgrade guide to update the native project as well.

npm

npm install @joyfill/[email protected]

Yarn

yarn add @joyfill/[email protected]

If native peers are missing, add them using the ranges below. Remove packages you already have at compatible versions from this command. For Yarn, replace npm install with yarn add.

npm install "react-native-webview@>=13.16.1 <14" \
  "react-native-svg@>=15.15.4 <16" \
  "@react-native-community/datetimepicker@>=9.1.0 <10" \
  "react-native-gesture-handler@>=2.32.0 <3" \
  "react-native-reanimated@>=4.5.1 <4.6" "[email protected]"

Reanimated, Worklets, and React Native must also support each other. Check the Reanimated compatibility table when changing one of these packages.

If not already configured, add the Worklets plugin last in babel.config.js, retaining other plugins before it:

module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: ['react-native-worklets/plugin'],
};

Remove an old react-native-reanimated/plugin entry if you are upgrading from Reanimated 3. Do not configure both plugins.

If you add or change native dependencies, update iOS pods and rebuild using your application's usual workflow.

Expo (managed)

Keep your existing Expo configuration when its React, React Native, and native dependency versions satisfy Joyfill's declared ranges. Expo SDK 57 is the tested framework target for this release. If your current SDK cannot provide a compatible set, review Expo's SDK upgrade guide before changing framework versions.

Install Joyfill:

npx expo install @joyfill/[email protected]

For missing native peers, let Expo select versions for your current Expo SDK. Remove packages you already have at compatible versions from this command, then confirm the selected versions also satisfy Joyfill's ranges:

npx expo install react-native-webview react-native-svg \
  @react-native-community/datetimepicker react-native-gesture-handler \
  react-native-reanimated react-native-worklets

Use npx expo install --check to review framework compatibility; it may prompt to update mismatched packages. Expo's version selection does not replace checking Joyfill's peer requirements. See Expo's dependency validation guidance.

Implement your code

Below is a usable example of our react-native document native embedded.


import React, { useState, useEffect } from 'react';
import { Dimensions, View } from 'react-native';
import { JoyDoc, getDefaultDocument } from '@joyfill/components-react-native';

const screenWidth = Dimensions.get('window').width;

const template = <PASTE_JSON_TEMPLATE>

function Document() {

  const [doc, setDoc] = useState(template || getDefaultDocument());

  return (
    <View style={{flex: 1}}>
      <JoyDoc
        mode="fill"
        doc={doc}
        width={screenWidth}
        onChange={(changelogs, doc) => {
          console.log('onChange doc: ', doc);
          setDoc(doc);
        }}
        onUploadAsync={async (params) => {
          // Add your picker/upload handler and return { url, fileName, filePath } objects.
          console.log('onUploadAsync: ', params);
          return []; // No file selected; leave the document unchanged.
        }}
      />
    </View>
  );
}

export default Document;

JoyDoc Params

  • mode: 'fill' | 'readonly'

    • Required*
    • Enables and disables certain JoyDoc functionality and features.
    • Options
      • fill is the mode where you simply input the field data into the form
      • readonly is the mode where everything in the form is set to read-only.
  • doc: object

    • The JoyDoc JSON object to load into the SDK. Must be in the JoyDoc JSON data structure.
    • The SDK uses object reference equality checks to determine if the doc or any of its internal pages or fields have changed in the JSON. Ensure you’re creating new object instances when updating the document, pages, or fields before passing the updated doc JSON back to the SDK. This will ensure your changes are properly detected and reflected in the SDK.
  • initialPageId: string

    • Specify the initial page to display in the form.
    • Utilize the _id property of a Page object. For instance, page._id.
    • If page is not found within the doc it will fallback to displaying the first page in the pages array.
  • view: 'mobile' | 'desktop'

    • Enables you to set the active view. Defaults to mobile. Only PDF deskop page view are supported right now. If the active page does not have a PDF view then it will default back to using the mobile view.
  • navigation: object

    • Display/hide page and view navigation.
    • Defaults to { pages: true }
    • Set the pages property to true (display) or false (hide). For instance, {pages: false} hides the page navigation.
    • Set the views property to true (display) or false (hide). For instance, {views: false} hides the views (mobile and primary) navigation options.
  • onChange: (changelogs: object_array, doc: object) => {}

    • Used to listen to any field change events.
    • changelogs: object_array
    • doc: object
      • Fully updated JoyDoc JSON structure with changes applied.
  • onFocus: (params: object, e: object) => {}

    • Used to listen to field focus events.
    • params: object
      • Specifies information about the focused field.
    • e: object
      • Element helper methods.
      • blur: Function
        • Triggers the field blur event for the focused field.
        • If there are pending changes in the field that have not triggered the onChange event yet then the e.blur() function will trigger both the change and blur events in the following order: 1) onChange 2) onBlur.
        • If the focused field utilizes a modal for field modification, ie. signature, image, tables, etc. the e.blur() will close the modal.
  • onBlur: (params: object) => {}

    • Used to listen to field focus events.
    • params: object
      • Specifies information about the blurred field.
  • theme: object

    • Specify custom theme properties.
    • Sample theme object { fontFamily: { regular: "Ariel", bold: "Ariel-bold" }, button: { primary: { fontWeight: "bold", borderRadius: "10px", ... } }
    • The button primary, secondary, and danger support the React Native Supported Styles
    • fontFamily: object
      • fontFamily.regular: string
      • fontFamily.bold: string
      • Apply custom font family to display text.
      • IMPORTANT: If you're using a custom font, you are responsible to ensure the fonts are loaded before rendering the component. Could result in an error if font is not loaded properly before render.
    • button: object
      • button.primary: object
        • Specifies styles for primary field buttons.
      • button.secondary: object
        • Specifies styles for secondary internal field buttons.
      • button.danger: object
        • Specifies styles for delete buttons.

SDK Helper Methods

  • getDefaultDocument
    • Get a default Joyfill Document object
  • getDefaultTemplate
    • Get a default Joyfill Template object
  • getDocumentFromTemplate: ( template: object )
    • Generate a Joyfill Document object from a Joyfill Template object
  • duplicate: ( original: object, defaults: object )
    • Duplicate a Joyfill Document or Template object.
  • duplicatePage: ( original: object, fileId: string, pageId: string )
    • Duplicate a Joyfill Document or Template Page object.
    • Returns: { doc: object, changelogs: array }
      • doc fully updated Document or Template with the page added
      • changelogs array of changelogs for new duplicate page.
  • applyLogic: ( items: object_array, fields: object_array, fieldLookupKey: string )
    • Apply show/hide logic to pages and fields for external filtering.
    • Wrapper around @joyfill/conditional-logic library. View library

Field Events

  • Text, Textarea, Number
    • onFocus(params: object, e: object) is fired when the field is focused.
    • onChange is fired when the field value is modified.
    • onBlur is fired when the field is blurred.
  • Date, Dropdown
    • onFocus is fired when the field is pressed and selection modal is displayed.
    • onChange is fired when the field value is modified.
    • onBlur is fired when the field is blurred and the selection modal is closed.
  • Multiselect
    • onFocus is fired when an option is selected or unselected for the first time on the field.
    • onChange is fired when an option is selected or unselected in the field.
  • Chart
    • onFocus is fired when “view” button is pressed and modal is displayed.
    • onChange is fired when the field value is modified.
    • onBlur is fired when modal is closed.
  • Image
    • onFocus is fired when “view” button is pressed and modal is displayed.
      • An empty image field that is focused will also trigger the onUploadAsync request.
      • A populated image field that is focused will trigger the image modal to open.
    • onChange is fired when the field images are uploaded or removed.
    • onBlur is fired when modal is closed.
  • Signature
    • onFocus is fired when open modal button is pressed and modal is displayed.
    • onChange is fired when the field value is modified.
    • onBlur is fired when the modal is closed.
  • Table
    • onFocus is fired when “view” button is pressed and modal is displayed.
    • onBlur is fired when modal is closed.
    • Table Cells
      • Text Cell
        • onFocus is fired when the cell is focused.
        • onChange is fired when the cell value is modified.
        • onBlur is fired when the cell is blurred
      • Dropdown Cell
        • onFocus is fired when the cell is pressed and selection modal is displayed.
        • onChange is fired when the field value is modified.
        • onBlur is fired when the cell is blurred and the selection modal is closed.
      • Image Cell
        • onFocus is fired cell is pressed and modal is displayed.
        • onChange is fired when the cell images are uploaded or removed.
        • onBlur is fired when modal is closed.

IMPORTANT NOTE: JoyDoc SDK onFocus, onChange and onBlur events are not always called in the same order. Two different fields can be triggering events at the same time. For instance, if you have Field A focused and then focus on Field B, the Field B onFocus event could be fired before the Field A onBlur event. Always check the event params object ids to match up the associated field events.