Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tetracalibers/polym-generic-layout


https://github.com/tetracalibers/polym-generic-layout

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

        

# @polym/generic-layout

**Collection of React generic layout components inspired by [Every-Layout](https://every-layout.dev/)**

## Demo & Document

[Click here to visit the **playground site** where you can operate and play props.](https://tetracalibers.github.io/polym-generic-layout/?path=/story/layout-introduction--page)

## Concept

### as props

The container that realizes the layout is rendered in div by default, but this can be changed by `as` props.

The `as` can be

- HTML tag name
- React component
- styled component

Depending on the `as`, the `ref` and props that can be specified for the component will change.

If `as` is rendered as an HTML element, then all of the HTML attributes of that element can be specified `as` props.

If `as` is a component, the functions and styles that the component has are merged.

---

## AspectFrame

**Responsive images with preserved aspect ratio**

```ts

```

## Grid

**Responsive grid layout without explicit media queries**

```ts





```

## HorizontalCenter

**Horizontal Centering Layout**

```ts





```

## VerticalCenter

**Layout that vertically centers any of several vertically aligned elements**

```ts





```

## HorizontalStack

**Horizontal alignment layout that wraps nicely on small screens**

```ts





```

## VerticalStack

**Layout with elements evenly spaced vertically**

```ts









```

## SwitchStack

**Layout switches from horizontal to vertical depending on screen width and number of elements**

```ts





```

## TwoColumn

**Responsive two-column layout with side content and main content**

```ts


```

## OverlapLayer

**Layout with layers on top of layers**

Usage: Modal Dialog, Fixed Header, etc.

```ts




```

## SliderAlign

**Scrollable horizontal alignment layout**

Usage: Carousel, etc.

```ts





```