
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
use-title-case
Advanced tools
A React hook to properly capitalize titles using Vercel's title library
React Title Case is a simple React Hook that provides a callback for Vercel's title library, which correctly capitalizes strings as per The Chicago Manual of Style.
# Using pnpm
pnpm add use-title-case
# Using yarn
yarn add use-title-case
# Using npm
npm install use-title-case
import { useTitleCase } from "use-title-case";
export const YourSnazzyComponent = () => {
const title = useTitleCase();
return (
<div>
<h1>{title("i Am An INCorrectly capitAlized TITLE")}</h1>
</div>
);
};
// The <h1/ > element's text will be rendered as "I am an Incorrectly Capitalized Title"
import { TitleCase } from "use-title-case";
export const YourSnazzyComponent = () => {
return (
<div>
<h1>
<TitleCase>i Am An INCorrectly capitAlized TITLE</TitleCase>
</h1>
</div>
);
};
// The <h1/ > element's text will be rendered as "I am an Incorrectly Capitalized Title"
React Title Case comes with some (primarily networking/infrastructure-focused) built-in overrides. However, you can add override strings in multiple ways, as needed:
import { useTitleCase } from "use-title-case";
export const YourSnazzyComponent = () => {
const title = useTitleCase({ overrides: ["TITLE"] });
return (
<div>
<h1>{title("i Am An INCorrectly capitAlized TITLE")}</h1>
</div>
);
};
// The <h1/ > element's text will be rendered as "I am an Incorrectly Capitalized TITLE"
# As a comma-separated list:
export USER_OVERRIDES="INCorrectly,TITLE"
# As a JSON array:
export USER_OVERRIDES="[INCorrectly,TITLE]"
# This will also work:
export USER_OVERRIDES='["INCorrectly","TITLE"]'
import { TitleCaseProvider, useTitleCase } from "use-title-case";
export const YourSnazzyComponent = () => {
const title = useTitleCase();
return (
<div>
<h1>{title("i Am An INCorrectly capitAlized TITLE")}</h1>
</div>
);
};
export const App = () => {
return (
<TitleCaseProvider overrides={["INCorrectly", "TITLE"]}>
<YourSnazzyComponent />
</TitleCaseProvider>
);
};
// The <h1/ > element's text will be rendered as "I am an INCorrectly Capitalized TITLE"
| Property | Type | Default | Description |
|---|---|---|---|
overrides | string[] | See here | Provide an array of strings that should not be capitalized |
useBuiltIns | boolean | true | Set to false if you don't want to use the default overrides. |
FAQs
A React hook to properly capitalize titles using Vercel's title library
We found that use-title-case demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.