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.
@zendeskgarden/container-grid
Advanced tools
This package includes containers relating to Grid in the Garden Design System.
npm install @zendeskgarden/container-grid
Check out storybook for live examples.
The following code demonstrates uncontrolled usage of the useGrid
hook. Controlled usage examples
can be found in the stories.
import { useGrid } from '@zendeskgarden/container-grid';
const matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
const Grid = () => {
const { getGridCellProps } = useGrid({ matrix });
return (
<table role="grid">
<tbody>
{matrix.map((row, rowIdx) => (
<tr key={`rowIdx-${row[0]}`}>
{row.map((item, colIdx) => (
<td role="presentation" key={item}>
<button
{...getGridCellProps({
rowIdx,
colIdx,
'aria-label': `cell for ${item}}`
})}
>
{item}
</button>
</td>
))}
</tr>
))}
</tbody>
</table>
);
};
import { GridContainer } from '@zendeskgarden/container-grid';
const matrix = [
[1,2,3],
[4,5,6],
[7,8,9]
]
<GridContainer>
{({ getGridCellProps }) => (
<table role="grid">
<tbody>
{matrix.map((row, rowIdx) => (
<tr key={`rowIdx-${row[0]}`}>
{row.map((item, colIdx) => (
<td role="presentation" key={item}>
<button
{...getGridCellProps({
rowIdx,
colIdx,
'aria-label': `cell for ${item}}`
})}
>
{item}
</button>
</td>
))}
</tr>
))}
</tbody>
</table>
)}
</GridContainer>;
FAQs
Containers relating to Grid in the Garden Design System
We found that @zendeskgarden/container-grid 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.
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.