@smashing/title
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Title

Manage page title with React component.

yarn add @smashing/title

Change page title

This will set page title to About. If app title is configured, it will be set to About - App Title

import {Title} from "@smashing/title"

export const AboutPage = () => (
  <div>
    <Title>About</Title>
  </div>
)

Setup app title and separator

import {TitleContext} from "@smashing/title"

export const App = () => (
  <TitleContext.Provider
    value={{
      title: 'My App Name',
      separator: ' - '
    }}
  >
    {/* ... */}
  </TitleContext.Provider>
)

Readme

Keywords

Package Sidebar

Install

npm i @smashing/title

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

4.16 kB

Total Files

7

Last publish

Collaborators

  • amroz123
  • hzub
  • idered
  • mkolakowska
  • mzbiejczuk
  • qk