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

@modhamanish/react-native-text-wrap-around-image

v1.0.2

Published

A React Native component for wrapping text around images with support for floating layouts, circular shapes, and custom styling using WebView.

Readme

React Native Text Wrap Around Image

A persistent and flexible React Native component that allows you to wrap text around images, supporting floating layouts, circular shapes, and rich customization. It leverages react-native-webview for high-performance rendering of complex text flows.

Demo

Features

  • 📄 Text Wrapping: Wrap text around images on the left or right.
  • 🖼️ Image Shapes: Support for rectangular and circular images.
  • 🎨 Rich Styling: Customize fonts, colors, margins, and more for titles, text, and images.
  • 🌓 Dark Mode Support: Built-in support for dark mode adaptation.
  • 🌍 RTL Support: Ready for Right-to-Left languages.
  • 🔗 Click Events: Handle interactions with sections.
  • 📡 Remote Data: Fetch sections content directly from an API.

Installation

npm install @modhamanish/react-native-text-wrap-around-image react-native-webview
# or
yarn add @modhamanish/react-native-text-wrap-around-image react-native-webview

> Note: This package depends on react-native-webview. Make sure to follow its installation guide for native dependencies.

Usage

Basic Example

import React from 'react';
import { SafeAreaView } from 'react-native';
import TextWrapAroundImage, { WrapSection } from '@modhamanish/react-native-text-wrap-around-image';

const App = () => {
  const sections: WrapSection[] = [
    {
      id: "1",
      title: "Beautiful Landscapes",
      titleStyle: {
        fontSize: 24,
        fontWeight: "bold",
        color: "#333"
      },
      image: "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=400",
      text: "This is a long paragraph that will wrap around the image. The image is floating to the left, and the text flows naturally around it, creating a magazine-like layout experience directly in your React Native app.",
      floatSide: "left",
      isCircle: true,
      imageStyle: {
        width: 100,
        height: 100,
        margin: "0 15px 5px 0"
      },
      textStyle: {
        fontSize: 16,
        color: "#555"
      }
    },
    {
      id: "2",
      title: "Modern Architecture",
      image: "https://images.unsplash.com/photo-1486325212027-8081e485255e?w=400",
      text: "You can also float images to the right. This allows for diverse layout options. The component handles HTML rendering efficiently ensuring smooth performance.",
      floatSide: "right",
      sectionStyle: {
        margin: "20px 0"
      }
    }
  ];

  return (
    <SafeAreaView style={{ flex: 1 }}>
      <TextWrapAroundImage 
        sections={sections}
        enableDarkMode={true}
        onItemClick={(item) => console.log('Clicked:', item.title)}
      />
    </SafeAreaView>
  );
};

export default App;

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | sections | WrapSection[] | [] | Array of data sections to render. | | apiUrl | string | undefined | URL to fetch sections data from remotely. | | rtl | boolean | false | Enable Right-to-Left text direction. | | enableDarkMode | boolean | true | Automatically adjust colors for system dark mode (can be overridden by styles). | | onItemClick | (section) => void | undefined | Callback when a section text is clicked. |

Data Structure: WrapSection

| Property | Type | Description | |----------|------|-------------| | id | string | Unique identifier for the section. | | title | string | Title text for the section (optional). | | titleStyle | object | Styling for the title (color, fontSize, margin, etc.). | | image | string | URL of the image. | | text | string | Main content text. | | isCircle | boolean | If true, renders the image as a circle using shape-outside. | | floatSide | 'left' \| 'right' | Side to float the image. | | sectionStyle | object | Container styles for the section (margin, padding, background). | | imageStyle | object | Styles specifically for the image (width, height, borderRadius, margin). | | textStyle | object | Styles for the paragraph text. |

License

ISC