🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

react-seo-manager

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-seo-manager

`React-seo-manager` is a lightweight React utility for managing SEO meta tags dynamically. It simplifies the process of updating page titles, descriptions, and other meta elements to improve search engine visibility and social media sharing.

latest
npmnpm
Version
1.1.4
Version published
Maintainers
0
Created
Source

React-seo-manager

Overview

React-seo-manager is a lightweight React utility for managing SEO meta tags dynamically. It simplifies the process of updating page titles, descriptions, and other meta elements to improve search engine visibility and social media sharing.

Features

  • Dynamically set page titles and meta descriptions
  • Supports Open Graph and Twitter Card meta tags
  • Easy integration with React applications
  • Works with React 17 and 18

Installation

npm install react-seo-manager

or

yarn add react-seo-manager

Usage

Import the package and use it in your React components:

import React from "react";
import { useSEO } from "react-seo-manager";

const MyPage = () => {
  useSEO({
    title: "My Awesome Website - Home",
    description:
      "Welcome to my awesome website! Explore our features and services.",
    keywords: "website, awesome, features, services",
    image: "https://example.com/og-image.jpg",
    url: "https://example.com",
    type: "website",
  });

  return (
    <>
      <useSEO
        title="My Awesome Page"
        description="This is a great page for demonstrating React SEO capabilities."
        keywords="react, seo, meta tags"
      />
      <h1>Welcome to My Page</h1>
    </>
  );
};

export default MyPage;

Props

PropTypeDescription
titlestringPage title
descriptionstringMeta description for search engines
keywordsstringKeywords for SEO
ogTitlestringOpen Graph title for social media
ogImagestringURL of the Open Graph image
ogDescriptionstringOpen Graph description
twitterTitlestringTitle for Twitter Card
twitterImagestringImage URL for Twitter Card
twitterDescriptionstringDescription for Twitter Card

Development & Build

To build the project, use:

npm run build

For testing:

npm test

License

This project is licensed under the ISC License.

Author

Created by Abdulla al Mamun.

Keywords

react

FAQs

Package last updated on 30 Jan 2025

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