A React component that automatically transforms URLs, emails, and other linkable text patterns into clickable anchor tags. Current stable version is 0.2.2, with a 1.0.0-alpha release available. It wraps the linkify-it library and recurses through children to detect links, supporting custom component wrappers, properties, and the ability to customize the underlying linkify-it instance. Differentiators include simple declarative usage as a React component, support for nested elements, and full customization via the linkify-it API.
npm install react-linkifyVerified import paths — ran on the pinned version, not inferred.
Basic usage of the Linkify component to turn URLs and emails into clickable links.
Define your own MATCH placeholder string and pass it via the 'properties' prop.
Pass a 'component' prop that wraps each link (e.g., 'span') to preserve existing behavior.
Clone or isolate the instance if you need separate configurations.
Run 'npm install linkify-it' or 'yarn add linkify-it'.
Use a plain string like 'MATCH' in the properties object instead.
Ensure the parent component provides its own keys to static children, or use React.Fragment to isolate.