@use-gpu/layout

0.10.1 • Public • Published

@use-gpu/layout

npm install --save @use-gpu/layout
yarn add @use-gpu/layout

Docs: https://usegpu.live/docs/reference-components-@use-gpu-layout

Use.GPU - 2D Layout

Absolute, Block, Flex, Inline, Overflow.

Example

How to center text inside a centered box. Yes, horizontally and vertically. Wow.

return (
  <Flat>

    <Pass>
      <UI>

        <Flex width="100%" height="100%" align="center">
          <Flex width={500} height={150} fill="#3090ff" align="center">

            <Inline>
              <Text weight="black" size={48} color={[1, 1, 1, 1]}>-~ Use.GPU ~-</Text>
            </Inline>

          </Flex>
        </Flex>

      </UI>
    </Pass>

  </Flat>
);

Colofon

Made by Steven Wittens. Part of @use-gpu.

Package Sidebar

Install

npm i @use-gpu/layout

Weekly Downloads

7

Version

0.10.1

License

MIT

Unpacked Size

269 kB

Total Files

117

Last publish

Collaborators

  • unconed