# @domir/react-native-measure-text

> Measure text width synchronously using JSI

Latest version **0.1.10** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @domir/react-native-measure-text
pnpm add @domir/react-native-measure-text
yarn add @domir/react-native-measure-text
bun add @domir/react-native-measure-text
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2026-09-09 |
| First published | 2022-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Dominique |
| Maintainers | domir |
| Keywords | react-native, expo, react-native-measure-text, ReactNativeMeasureText |

## Links

- npm: https://www.npmjs.com/package/@domir/react-native-measure-text
- Repository: https://github.com/DomiR/react-native-measure-text
- Homepage: https://github.com/DomiR/react-native-measure-text#readme
- Issues: https://github.com/DomiR/react-native-measure-text/issues
- npm.io page: https://npm.io/package/@domir/react-native-measure-text

## Recent versions

- 0.1.10 (latest) — 2026-09-09
- 0.1.9 — 2025-11-13
- 0.1.8 — 2024-01-23
- 0.1.7 — 2023-08-15
- 0.1.6 — 2023-06-22
- 0.1.5 — 2023-06-22
- 0.1.4 — 2023-06-22
- 0.1.3 — 2022-11-28
- 0.1.2 — 2022-10-17
- 0.1.1 — 2022-10-17
- 0.1.0 — 2022-10-17

## README

# react-native-measure-text

Measure the size of a string of text in React Native synchronously.

This can be useful for calculating the size of a string of text before rendering it, for example for animation targets.

# API documentation

### Add the package to your npm dependencies

```
npm install @domir/react-native-measure-text
```

### Configure for iOS

Run `npx pod-install` after installing the npm package.


### Configure for Android

No additional configuration is needed.

### Usage

```js
import * as MeasureText from '@domir/react-native-measure-text';

MeasureText.measureWidth('Hello World', {
  fontSize: 20,
  fontFamily: 'Helvetica',
  fontWeight: 'normal',
  // TBD
  // fontStyle: 'normal',
  // fontVariant: ['small-caps'],
  // letterSpacing: 0,
  // lineHeight: 20,
  // textAlign: 'left',
  // textDecorationLine: 'none',
  // textTransform: 'none',
  // includeFontPadding: true,
  // maxWidth: 100,
  // maxHeight: 100,
  // numberOfLines: 1,
  // ellipsizeMode: 'tail',
})

---
_Source: https://npm.io/package/@domir/react-native-measure-text · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
