Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-helmet

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-helmet

A document head manager for React

  • 5.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
764K
decreased by-58.05%
Maintainers
1
Weekly downloads
 
Created

What is react-helmet?

The react-helmet npm package is a reusable React component that manages all changes to the document head. It allows developers to dynamically set what's in the head section of the HTML document, including the title, meta tags, and other head elements, which is particularly useful for handling SEO in React applications.

What are react-helmet's main functionalities?

Managing the document title

This feature allows you to set the content of the <title> tag in the document head, which is displayed as the title of the tab in web browsers.

{"<Helmet>\n  <title>My Title</title>\n</Helmet>"}

Setting meta tags

With this feature, you can dynamically set various meta tags for your page, which can be used by search engines and social media platforms for SEO and content sharing purposes.

{"<Helmet>\n  <meta name='description' content='Page description' />\n  <meta name='keywords' content='React, SEO' />\n</Helmet>"}

Adding link tags

This feature allows you to include link elements in the head of the document, such as canonical links, stylesheets, or preconnect URLs.

{"<Helmet>\n  <link rel='canonical' href='http://mysite.com/example' />\n</Helmet>"}

Adding script tags

This feature enables you to insert script tags into the head of the document, which can be used to include external JavaScript files or inline scripts.

{"<Helmet>\n  <script src='http://include.com/pathtojs.js' type='text/javascript' />\n</Helmet>"}

Setting HTML attributes

This feature allows you to set attributes on the <html> tag, such as the language of the document.

{"<Helmet>\n  <html lang='en' />\n</Helmet>"}

Setting body attributes

With this feature, you can set attributes on the <body> tag, such as class names or data attributes.

{"<Helmet>\n  <body class='dark-mode' />\n</Helmet>"}

Other packages similar to react-helmet

Keywords

FAQs

Package last updated on 28 Mar 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc