Download the PHP package bugo/flexgrid without Composer

On this page you can find all versions of the php package bugo/flexgrid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flexgrid

# FlexGrid PHP Builder

PHP Coverage Status

Fluent PHP library for generating CSS Grid and Flexbox layouts. Supports named areas, line-based placement, responsive breakpoints, and ready-made presets for common patterns.


Installation


Quick start


GridBuilder

GridBuilder is the main class. All methods return static, so they chain freely.

Columns and rows

Use GridValue helpers to avoid writing CSS strings by hand:

Shorthand methods for repeated tracks:

Gap

Named template areas

Use GridTemplate to define the visual layout as an ASCII-art grid:

For a more compact syntax, pass the area names as strings directly:

Grid items (child elements)

Attach GridItem objects to the builder to generate child selectors alongside the container:

Line-based placement

When named areas are not used, place items by grid line numbers:

Alignment

Grid alignment is split into two enums:

ItemAlignment cases: Start, End, Center, Stretch, Baseline.

ContentAlignment cases: Start, End, Center, Stretch, SpaceBetween, SpaceAround, SpaceEvenly.

Self-alignment on items:

Auto flow and implicit tracks

Responsive breakpoints

responsive(int $minWidth, callable) wraps a variant in @media (min-width: …). media(string $query, callable) accepts any media query string.

Inline styles

toInlineStyle() returns a string suitable for the HTML style attribute — no selector, no braces:

Inline grid


Presets

The Grid facade provides one-liner factory methods for the most common layouts. Every preset returns a GridBuilder you can keep chaining.

Grid::columns()

Equal N-column layout.

Grid::fluid()

Responsive fluid columns using auto-fill. Columns collapse automatically when the container is too narrow.

Grid::sidebar()

Fixed-width sidebar on the left, fluid content on the right.

Grid::centered()

Centers content at a max-width by placing fluid gutters on either side.

Place your content in the middle column:

Grid::holyGrail()

Classic five-area layout: header across the top, sidebar + main content + aside in the middle, footer across the bottom.

Grid::dashboard()

Two-column dashboard with a persistent sidebar and a three-row main area.

Grid::masonry()

Dense auto-flow grid for JavaScript masonry: items are placed greedily to fill gaps. Pair with JS to calculate grid-row-end per item.


GridValue reference

Static helpers for CSS Grid value functions. All return plain strings.

Call Output
GridValue::fr(1) "1fr"
GridValue::fr(2.5) "2.5fr"
GridValue::minmax('200px', '1fr') "minmax(200px, 1fr)"
GridValue::repeat(3, '1fr') "repeat(3, 1fr)"
GridValue::repeat('auto-fill', '1fr') "repeat(auto-fill, 1fr)"
GridValue::fitContent('300px') "fit-content(300px)"
GridValue::Auto->value "auto"
GridValue::MaxContent->value "max-content"
GridValue::MinContent->value "min-content"

GridArea reference


GridItem reference


GridTemplate reference


Flex Examples

Basic row with gap

Flexible cards with wrapping

Toolbar alignment

Responsive direction switch

Direction/wrap helpers and repeated gap calls


Flex Presets

The Flex facade provides one-liner factory methods for common Flexbox layouts.

Flex::row()

Flex::column()

Flex::cards()

Flex::sidebar()

FlexBuilder wrapping helpers

noWrap() is shorthand for wrap(FlexWrap::NoWrap). Repeated gap(...) calls do not accumulate: the last call replaces the previous value.


References


All versions of flexgrid with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bugo/flexgrid contains the following files

Loading the files please wait ...