titlefx
v0.2.4
Published
Lightweight library to format and apply document.title with presets and tab animations.
Downloads
494
Readme
titlefx
Small helper to format and apply document.title through presets. Browser-only; in SSR or without window/document it stays inert.
Usage
import titlefx from "titlefx";
titlefx.preset("default", {
brand: "Spotify",
context: "Homepage",
});
titlefx.preset("notifications", {
prefix: "🔥",
context: "Novo match",
brand: "Tinder",
count: 3,
suffix: "❤️😍🥰",
});
titlefx.dispose();Install
npm install titlefxpnpm add titlefx
bun add titlefxDocumentation
Site built with VitePress (guide, API, interactive playground):
npm install
npm run docs:devBuild for static hosting (e.g. GitHub Pages):
npm run docs:buildOutput: docs/.vitepress/dist. In docs/.vitepress/config.ts, base defaults to / (domínio na raiz). Para GitHub Pages em https://<user>.github.io/<repo>/, define base: '/<repo>/'.
Repository: github.com/ganobrega/titlefx
