Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
columns3000
Advanced tools
Readme
A simple flex-based column/grid component for React.
yarn add columns3000
import {Columns, Column} from 'columns3000';
// in render
<Columns
columns={12}
justify="flex-start"
// Gutter With units! use px, rem, vw, etc, even css variables or calc()!
gutter="16px"
breakpoint="720px"
>
<Column span={6}>This is column spans 6!</Column>
<Column span={6}>This is column spans 6 too!</Column>
</Columns>;
Responsive gutters, span or columns?
I suggest using useMedia
from react-use
like below:
import {Columns, Column} from 'columns3000';
import {useMedia} from 'react-use';
const isNarrow = useMedia('(max-width: 1024px)');
const span = isNarrow ? 2 : 4;
const gutter = isNarrow ? '16px' : 'var(--gutterLarge)';
// in render
<Columns
columns={12}
justify="flex-start"
// Gutter With units! use px, rem, vw, etc, even css variables or calc()!
gutter={gutter}
breakpoint="720px"
>
<Column span={span}>Spans 4 on width > 1024 and 2 below!</Column>
<Column span={span}>Same!</Column>
<Column span={span}>Same!</Column>
<Column span={span}>Same!</Column>
</Columns>;
Columns
propsProperty | Type | Description | Default value |
---|---|---|---|
columns | number | total number of columns of the grid system | 12 |
justify | string | css property justify-content, alignment of inner columns | flex-start |
gutter | string | the horizontal/vertical spacing between columns | 16px |
breakpoint | string | the viewport width where single/multi-column layout is toggled | 720px |
Column
propsProperty | Type | Description | Default value |
---|---|---|---|
span | number | amount of columns the columns spans horizontally | required prop |
grow | boolean | flex-grows the column | false |
If you're like me who:
emotion
. (Note: this uses
emotion!)Look no further! I tried to basically make a component to make myself happy for
most of the use cases I do/would encounter. This does not use any other
classNames
or some imported css. I think it's "clean" in it just uses emotion
generated classnames, and takes advantage of css variables to make it do its
thing.
A Columns
parent and Column
wrapper components. Togehter they do these
things:
span
a specified number of
columnsThat's it!
Enjoy 🌸
FAQs
A simple flex-based column/grid component for React.
The npm package columns3000 receives a total of 0 weekly downloads. As such, columns3000 popularity was classified as not popular.
We found that columns3000 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.