1.0.9 • Published 15 days ago

intuitive-flexbox v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

Intuitive Flexbox

Installation

   yarn add intuitive-flexbox

Implementation

import { HBox, VBox } from "intuitive-flexbox";
export default function HomePage() {
  return (
    <VBox className="h-screen bg-black py-10 text-white">
      <h1 className="mb-2">This is a VBox</h1>
      <HBox className="bg-blue-500 bg-opacity-50 py-2">
        This is an HBox
        <div className="mx-2 bg-red-500 px-2">with</div>
        <div className="mx-2 bg-green-500 px-2">multiple items</div>
      </HBox>
      <HBox className="bg-yellow-500 bg-opacity-50">This another HBox</HBox>
    </VBox>
  );
}

Props

VBox

Prop nameTypeDefault valueDescription
childrenReactNode-The content of the component
classNamestring-Additional CSS class name(s)
idstring-The id attribute of the component
centerbooleanfalseWhether to horizontally center the children
vcenterbooleanfalseWhether to vertically center the children
hFullbooleanfalseWhether to make the component full width

HBox

Prop nameTypeDefault valueDescription
childrenReactNode-The content of the component
classNamestring-Additional CSS class name(s)
idstring-The id attribute of the component
wFullbooleanfalseWhether to make the component full width
hFullbooleanfalseWhether to make the component full height
spaceBetweenbooleanfalseWhether to add space between the children
centerbooleanfalseWhether to horizontally center the children
vcenterbooleanfalseWhether to vertically center the children
styleRecord<string, unknown>-Additional inline styles to apply to the component
wrapbooleanfalseWhether to wrap the children onto multiple lines

Mad Props

1.0.9

15 days ago

1.0.8

15 days ago

1.0.7

15 days ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago