
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
flex-layout-system
Advanced tools
Effortlessly create dynamic, responsive grids with minimal code.
Why Flex Layout System?
xs, sm, md, lg, xl, xxl
) – no media queries needed.DEFAULT_MEDIA_SIZES
to fit your unique design requirements.Quick Example:
<flex-canvas w="1200px">
<flex-grid gap="50px, xs 10px, sm 20px, md 40px">
<flex-box center wrap dn="row, xs column">
<flex-cell w="50%, sm 100%">
<s-box center bgc="red" pd="20px, sm 10px">Box 1</s-box>
</flex-cell>
<flex-cell w="50%, sm 100%">
<s-box center bgc="green" pd="20px, sm 10px">Box 2</s-box>
</flex-cell>
</flex-box>
</flex-grid>
</flex-canvas>
Flex Layout System v2 is built with responsiveness at its core. You don’t need to write media queries or fiddle with CSS—everything is managed directly through attributes.
The system supports six predefined breakpoints:
xs
: Extra small (default: 0–600px)sm
: Small (default: 601–900px)md
: Medium (default: 901–1200px)lg
: Large (default: 1201–1440px)xl
: Extra large (default: 1441–1920px)xxl
: Ultra large (default: 1921px and above)Simply define responsive values for your attributes, separated by commas, and the library will handle the rest. For example:
<flex-grid gap="50px, xs 10px, sm 20px, md 40px">
<flex-box dn="row, xs column">
<flex-cell w="50%, sm 100%">
<s-box pd="20px, sm 10px">Responsive Box</s-box>
</flex-cell>
</flex-box>
</flex-grid>
and more... See the documentation for a full list of attributes.
Need specific breakpoints? Customize them globally using DEFAULT_MEDIA_SIZES:
window.DEFAULT_MEDIA_SIZES = {
xs: 500, // Extra small screens
sm: 800, // Small screens
md: 1100, // Medium screens
lg: 1400, // Large screens
xl: 1800, // Extra large screens
xxl: 2400, // Ultra large screens
};
This allows you to align the breakpoints with your unique design needs, and all responsive attributes will automatically adapt to your configuration.
Installation: Install the Flex Layout System package via npm:
npm install flex-layout-system
import "flex-layout-system";
To use the components directly in an HTML file:
<script src="https://unpkg.com/flex-layout-system/dist/browser.min.js"></script>
To use this library in your Next.js project:
npm install flex-layout-system
"use client";
import "flex-layout-system/jsx.types.d"; // Import JSX types
import "flex-layout-system"; // Import components
// Example usage:
<flex-box jc="space-between">
<span>1</span>
<span>2</span>
</flex-box>;
Important: This library uses Shadow DOM and is purely client-side, meaning it will only work on the client side. You can write syntax similar to regular HTML, but rendering will be handled exclusively on the client.
Ensure the library is imported on the client side. If you're using "use client"
, Next.js will handle the import correctly. However, if you're working with a server component, it won't render! You must ensure the script is loaded on the client side, either using lazy loading methods provided by Next.js or by utilizing Script
from next/script
to load the library as a polyfill for web component support on the client.
import Script from "next/script";
export default function MyComponent() {
return (
<>
<Script
src="https://unpkg.com/flex-layout-system/dist/browser.min.js"
strategy="lazyOnload"
/>
<flex-box jc="space-between">
<span>1</span>
<span>2</span>
</flex-box>
</>
);
}
npm install flex-layout-system
import "flex-layout-system";
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from "@angular/core";
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
Flex Layout System v2 redefines layout design for modern web developers, offering a streamlined, responsive, and highly maintainable solution. With fewer components, built-in styling, and intuitive responsiveness, it seamlessly integrates into any project or framework, enabling you to build sophisticated layouts effortlessly.
Explore more features, examples, and documentation on the official website.
This project was developed by unbywyd.
FAQs
Flex Layout
The npm package flex-layout-system receives a total of 31 weekly downloads. As such, flex-layout-system popularity was classified as not popular.
We found that flex-layout-system demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.