x-flexbox
v1.2.0
Published
Web Components which provide Flexbox features.
Downloads
252
Readme
x-flexbox
Web Components which provide Flexbox features.
Install
Using npm:
$ npm install x-flexbox
Usage
Import FlexContainer
and FlexItem
, register them.
<script type="module">
import { FlexContainer, FlexItem } from 'https://unpkg.com/x-flexbox';
customElements.define('flex-container', FlexContainer);
customElements.define('flex-item', FlexItem);
</script>
Put <flex-container>
and <flex-item>
.
<flex-container flex-direction="column" flex-wrap="wrap">
<flex-item flex-grow="2"></flex-item>
<flex-item align-self="stretch"></flex-item>
</flex-container>