Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@navita/adapter
Advanced tools
Navita is a powerful CSS-in-JS library that brings type-safe compile-time Atomic CSS-in-JS with zero runtime to your projects.
It allows you to easily style your components and apply themes without the need for any additional runtime dependencies.
With Navita, you can write clean and maintainable CSS in JavaScript, without sacrificing runtime performance.
🔥 All styles generated at build time — just like Sass, Less, etc.
✨ Minimal abstraction over standard CSS.
🦄 Works with any JS-based front-end framework — or even without one.
🎨 High-level theme system with support for simultaneous themes.
💪 Type-safe styles via CSSType.
🌳 Co-locate your styles with your components — if you want to.
🛠 Integrations with popular bundlers such as Webpack, Vite, and Next.js.
🌐 Check out the documentation site for setup guides, examples and API docs.
To start using Navita in your project, simply follow these steps:
npm install @navita/css --save
You'll also need to install the Navita integration for your preferred bundler. Navita currently supports Webpack, Vite, and Next.js.
npm install @navita/webpack-plugin mini-css-extract-plugin --save-dev
Update your webpack.config.js
file to include both MiniCssExtractPlugin and NavitaPlugin:
const { NavitaPlugin } = require('@navita/webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
// Other webpack options,
plugins: [
new MiniCssExtractPlugin(),
new NavitaPlugin(),
],
};
Read more about the Webpack integration in the Webpack documentation.
npm install @navita/vite-plugin --save-dev
And add it to your vite.config.js
file:
import { defineConfig } from 'vite';
import { navita } from '@navita/vite-plugin';
export default defineConfig({
plugins: [
// Other plugins
navita(/* Additional options */)
],
});
Read more about the Vite integration in the Vite documentation.
🚀 React Server Components support!
npm install @navita/next-plugin --save-dev
And add it to your next.config.js
file:
const { createNavitaStylePlugin } = require("@navita/next-plugin");
/** @type {import('next').NextConfig} */
const nextConfig = {};
module.exports = createNavitaStylePlugin({
// Additional options
})(nextConfig);
Read more about the Next.js integration in the Next.js documentation.
The main entry point for Navita is the style
function.
Make sure you read the reset of the documentation on
https://navita.style to learn more about the APIs.
import { style } from '@navita/css';
const container = style({
padding: '2rem',
background: 'hotpink',
color: 'white',
});
document.write(`
<div class="${container}">
Hello World!
</div>
`);
That's it!
💡 Only references to the classNames will be included in the bundle.
Note: Navita doesn't require special file extensions for your styles. You can co-locate your CSS styles with your components.
For detailed documentation, examples, and usage guidelines, please visit the official Navita website: https://navita.style
We welcome contributions from the community to make Navita even better!
MIT Licensed—A project by Eagerpatch.
Made with ❤️ by zn4rk and contributors.
FAQs
Shared adapter for Navita
The npm package @navita/adapter receives a total of 3 weekly downloads. As such, @navita/adapter popularity was classified as not popular.
We found that @navita/adapter 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.