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.
@commercetools-uikit/grid
Advanced tools
Readme
The Grid component can be used to implement layouts using CSS-Grid.
CSS Grid Layout is the most powerful layout system available in CSS. It is a 2-dimensional system, meaning it can handle both columns and rows, unlike flexbox which is largely a 1-dimensional system. You work with Grid Layout by applying CSS rules both to a parent element (which becomes the Grid Container) and to that elements children (which become Grid Items).
The component accepts all the supported properties of CSS Grid, both for the parent container and the children elements (<Grid.Item>
).
yarn add @commercetools-uikit/grid
npm --save install @commercetools-uikit/grid
Additionally install the peer dependencies (if not present)
yarn add react
npm --save install react
import Grid from '@commercetools-uikit/grid';
/**
* We also recommend having a look at the [Grid story examples](https://uikit.commercetools.com/?path=/story/examples-components-grid--with-fixed-columns)
* to see more detailed examples of common use cases of the CSS Grid layout.
**/
const Example = () => (
<Grid
gridGap="16px"
gridAutoColumns="1fr"
gridTemplateColumns="repeat(3, 1fr)"
>
<Grid.Item>{'1'}</Grid.Item>
<Grid.Item>{'2'}</Grid.Item>
<Grid.Item>{'3'}</Grid.Item>
<Grid.Item>{'4'}</Grid.Item>
<Grid.Item>{'5'}</Grid.Item>
</Grid>
);
export default Example;
Props | Type | Required | Default | Description |
---|---|---|---|---|
children | ReactNode | ✅ | ||
display | union Possible values: 'grid' , 'inline-grid' | 'grid' | ||
gridTemplateColumns | string | |||
gridTemplateRows | string | |||
gridTemplateAreas | string | |||
gridTemplate | string | |||
gridColumnGap | string | |||
gridRowGap | string | |||
gridGap | string | |||
justifyItems | union Possible values: 'start' , 'end' , 'center' , 'stretch' | |||
alignItems | union Possible values: 'start' , 'end' , 'center' , 'stretch' | |||
placeItems | union Possible values: 'start' , 'end' , 'center' , 'stretch' | |||
justifyContent | union Possible values: , 'start', 'end', 'center', 'stretch', 'space-around', 'space-between', 'space-evenly' | |||
alignContent | union Possible values: , 'start', 'end', 'center', 'stretch', 'space-around', 'space-between', 'space-evenly' | |||
placeContent | union Possible values: , 'start', 'end', 'center', 'stretch', 'space-around', 'space-between', 'space-evenly' | |||
gridAutoColumns | string | |||
gridAutoRows | string | |||
gridAutoFlow | string | |||
grid | string |
The component accepts all supported CSS Grid properties, as listed here, in camelCase format
FAQs
The Grid component can be used to implement layouts using CSS-Grid.
The npm package @commercetools-uikit/grid receives a total of 8,428 weekly downloads. As such, @commercetools-uikit/grid popularity was classified as popular.
We found that @commercetools-uikit/grid demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.