Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@christiankaindl/lyts
Advanced tools
Layout primitives for React.
Layout primitives to build any kind of layout with useful props like bleed
, asChild
and xAlign
/yAlign
.
⚛️ Components API · 📚 Guides · 📖 Examples
To get started, import a base component and compose them together—Stack, Row, Clamp, Columns, Grid—happy layout building!
[!NOTE] Version 2.0 introduced support for React 19, and migrated away from using
forwardRef()
. This means v2.0 may not work as intended when using with React 18 or earlier. If you want to passref
s to LYTS components and use React 18 or lower, consider using v1.2.0 instead, which has full support.
Layout components can be composed until you achieve your desired layout. For example, The following <CenterCard> component renders a card with a max-width of 400px, centers it and uses a Stack to get consistent spacing:
const CenterCard: FunctionComponent = function () {
return (
// A card with clamped 400px and centered
<Clamp clamp='400px'>
<Stack gap={0.75} className='card'>
<h3>Card title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</Stack>
</Clamp>
)
}
Check out the Examples page for a comprehensive collection of layouts and how to build them with LYTS.
A real-world example using LYTS is this documentation site, which makes extensive use of all components. Check out the code here!
If you get stuck, reach out to @christiankaindl on Twitter. In case of bugs, open an issue on GitHub.
npm install
npm run dev
FAQs
Layout primitives for React
The npm package @christiankaindl/lyts receives a total of 47 weekly downloads. As such, @christiankaindl/lyts popularity was classified as not popular.
We found that @christiankaindl/lyts 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.