Powered by dead simple CSS props and a mix of common convention rules.
<flex/>
in web development is used to define a flexbox
container, which enables flexible layout management within a parent element.
It allows child elements to dynamically adjust their size and alignment based
on available space and specified rules, making it ideal for creating responsive
and dynamic layouts.
<flex>
<span>- content -</span>
<span>- content -</span>
<span>- content -</span>
<span>- content -</span>
</flex>
prop | description | requires |
---|---|---|
- - x | sets flex direction to row | - |
- - y | sets flex direction to column | - |
<flex data-props="--x">
<span>- content -</span>
<span>- content -</span>
<span>- content -</span>
<span>- content -</span>
</flex>
<flex data-props="--y">
<span>- content -</span>
<span>- content -</span>
<span>- content -</span>
<span>- content -</span>
</flex>