Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@invertase/ui
Advanced tools
A set of UI components for products managed by [Invertase](https://invertase.io).
A set of UI components for products managed by Invertase.
# Using npm
npm i --save @invertase/ui
# Using Yarn
yarn add @invertase/ui
The project you're the library must have the react
&
tailwindcss
packages installed.
#install dependencies
yarn
#run typescipt transpiler
yarn watch
Components can be directly imported from the package:
import { Button, FloatingActionButton } from '@invertase/ui';
See the Storybook for a full list of available components.
Invertase UI is built on top of TailwindCSS, allowing you to take advantage of the features tailwind provides out of the box.
By default, the UI provides a base "blue" theme, which can be overridden via the tailwind configuration file:
// tailwind.config.js
module.exports = {
theme: {},
variants: {},
plugins: [require('@inverrtase/ui/dist/tailwind-plugin')()],
};
To change the default theme, provide a tailwind color to the plugin:
require('@inverrtase/ui/dist/tailwind-plugin')('red');
To provide a custom theme to the UI, update your stylesheet to provide a custom class, for example to create a "Twitter" theme:
// tailwind.css
@tailwind base;
@tailwind components;
@tailwind utilities;
.theme-twitter {
--color-primary: #3ca1f2;
--color-primary-hover: #3c80d1;
}
Inside of your React application, wrap the ThemeProvider
with the name of your chosen theme:
import React from 'react';
import { ThemeProvider } from '@invertase/ui';
function App() {
return <ThemeProvider value="twitter">...</ThemeProvider>;
}
If the theme could not be found, the default theme provided to the plugin will be used instead.
If you need to update the theme, you have two options:
value
passed to the ThemeProvider
(e.g. via local state).updateTheme
method provided by the useTheme
hook:import React from 'react';
function ChangeTheme() {
const { updateTheme } = useTheme();
return (
<button onClick={() => updateTheme('foobar')}>Change Theme</button>
);
}
FAQs
A set of UI components for products managed by [Invertase](https://invertase.io).
The npm package @invertase/ui receives a total of 0 weekly downloads. As such, @invertase/ui popularity was classified as not popular.
We found that @invertase/ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.