Skip to content

kherP/css-style-inject

Repository files navigation

https://img.shields.io/npm/v/css-style-inject Commitizen friendly semantic-release Dependabot Status https://img.shields.io/npm/l/css-style-inject npm bundle size

CSS Style Injector

Installation

npm

npm i css-style-inject

yarn

yarn add css-style-inject

Usage

Add this to your javascript/ typescript file

attach styles to head

import { injectCSS } from "css-style-inject";
injectCSS('..css', 'uniqueId');

detach styles from head

import { detachCSS } from "css-style-inject";
detachCSS('uniqueId')