MarkdownTextInput can be styled using style prop just like regular TextInput component.
It is also possible to customize the styling of the formatted contents of MarkdownTextInput component. The style object supports all color representations from React Native including PlatformColor and DynamicColorIOS according to the color reference. Currently, a limited set of styles is customizable but this is subject to change in the future.
[!TIP]
We recommend to store the style object outside of a component body or memoize the style object with React.useMemo.
Parsing logic
MarkdownTextInput behavior can be customized via parser property. Parser is a function that accepts a plaintext string and returns an array of MarkdownRange objects:
[!TIP]
We recommend to store the parser function outside of a component body or memoize the parser function with React.useMemo.
Markdown flavors support
Currently, react-native-live-markdown supports only ExpensiMark flavor. We are working on CommonMark support as well as possibility to use other Markdown parsers.
API reference
MarkdownTextInput inherits all props of React Native's TextInput component as well as introduces the following properties:
Prop
Type
Default
Note
parser
(value: string) => MarkdownRange[]
undefined
A function that parses the current value and returns an array of ranges.
markdownStyle
MarkdownStyle
undefined
Adds custom styling to Markdown text. The provided value is merged with default style object. See Styling for more information.
Compatibility
react-native-live-markdown requires React Native 0.75 or newer.
Drop-in replacement for React Native's TextInput component with Markdown formatting.
The npm package @expensify/react-native-live-markdown receives a total of 65,265 weekly downloads. As such, @expensify/react-native-live-markdown popularity was classified as popular.
We found that @expensify/react-native-live-markdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 0 open source maintainers collaborating on the project.
Package last updated on 19 Feb 2025
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.
TC39 met in Seattle and advanced 9 JavaScript proposals, including three to Stage 4, introducing new features and enhancements for a future ECMAScript release.