Simple javascript framework/library to create beautiful websites effortlessly. This framework makes grid coding on html easy. No need of CSS file and additional width height coding in CSS, which makes code easy to read and manage also prevents from repeatition. This is framework is based on CSS Grid unlike most of frameworks depend on flex or float. As this framework extracted from CSS, it is 2 dimentional. One line code can give whole page a desired layout. This framework also starts with new way to create grid.
There is no need to install you can just copy paste to the root folder. The traditional method was to use grid of 12 is obsolete now. CSS grid came to solve the grid making easy which is being widely used. Using this framework will make new styled way to create grid in unlimited number in two dimension.
- Download from latest release.
- Paste all files and folder in the main folder of your HTML code.
- Add
<script type="module" src="rowcolumn.js"></script>
to head of your html file. - Start making grid websites easily.
- On parent
<div>
create alayout
attribute like this<div layout="...">
. The row column codes will be written inside the layout attribute. - In simple words when someone calls
splits()
function on any number inside the layout attribute, like this<div layout="(100).splits(a1,a2,a3)">
which takes 3 arguments as you see area1
,a2
anda3
. The first two parameters will divide the main number into two partsleft side
andright side
. The last direction argument takes directionperpendicular
orparallel
, this basically means divide a line(Number) into two parts vertically or horizontally, for instance(100).splits(left, right, direction)
. - You can call this function like the example
(100).splits(60,40,'perpendicular')
. The (100) or parent value defines the width and height of the<div>
which is dividing the rectangle/square into two parts, 100 is divided into 60 and 40 vertically/perpendicularly. Number (100) will automatically set the divs width and height to100%
and100vh
respectively. - You can further divide the resultent div into two parts in different direction making the framework 2 dimentional example
<div layout="(100).splits(lg,sm.splits(lg,sm ,'parallel'),'perpendicular')">
herelg
andsm
are two primary numbers of the framework. - You can also make any desired number of columns and rows. There is no restriction to make 12 columns. To make 12 columns we just have to do like
<div layout="(100).splits(3/12,9/12,'perpendicular')">
this will make columns of 12 divided into 3 and 9 parts. Just start with any natural number, only basic maths about calulation is required to make any numbers of column. - You can also do further divide the columns in any direction you want, let say to divide the number rectangular display of any
div
further we do<div layout="(100).splits(3/12,(9/12).splits(6/9,(3/9),'perpendicular'),'perpendicular')">
in same direction or in different direction as many as. - In splitting any number remember the denominator of child must be same to the numerator of the parent, this is just an exception, but to make perfect column you should follow this.
- Uses breakpoints landscape and portrait. Utility function is provided to make desired breakpoint.
This framework will let us make grid, layout, and rows and columns easy. Just controlling the layout from parent <div>
without touching the children <div>
It is also free to use and open source.
Please contribute the repository and make it grow.
-> Based on Javascript ES6
-> Demo HTML file is added in repo for the disposal
-> Always use the latest version for new feature.
-> Works in React or any major framework