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

https://github.com/mikeleg/flexsaber

Flexsaber is a declarative Web Components library for building flexible layouts using Flexbox. Designed to work in plain HTML, frontend frameworks, or no-code environments. Precise, modular, and powerful like a lightsaber.
https://github.com/mikeleg/flexsaber

flexbox frontend html ui-library web-components

Last synced: about 2 months ago
JSON representation

Flexsaber is a declarative Web Components library for building flexible layouts using Flexbox. Designed to work in plain HTML, frontend frameworks, or no-code environments. Precise, modular, and powerful like a lightsaber.

Awesome Lists containing this project

README

          

# Flexsaber
[![Build](https://github.com/mikeleg/flexsaber/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/mikeleg/flexsaber/actions?query=workflow%3A%22Build%22)

![Flexsaber Logo](./logo.png)

**Flexsaber** is a declarative Web Components library for building flexible layouts using Flexbox. Designed to work in plain HTML, frontend frameworks, or no-code environments. Precise, modular, and powerful like a lightsaber.

---

## ๐Ÿš€ Installation
```bash
npm install flexsaber
```
---

## ๐Ÿงช Usage Example
```html


Item A
Item B

```

---

## ๐Ÿงฉ Components
- ``: Full-space container with optional scroll and padding
- ``: Horizontal flex container
- ``: Vertical flex container
- ``: Child element with optional `size`, `grow`, `shrink`, and `align`

---

## โš™๏ธ Attributes
All sizing values are in pixels (omit the `px` suffix).

| Attribute | Description |
|-------------|----------------------------------------|
| `gap` | Uniform spacing between children |
| `row-gap` | Vertical spacing override |
| `col-gap` | Horizontal spacing override |
| `wrap` | Enables wrapping |
| `align` | Align items vertically (e.g. center) |
| `justify` | Align items horizontally (e.g. start) |
| `grow` | Flex-grow value |
| `shrink` | Flex-shrink value |
| `size` | Flex-basis (initial size) |

---

## ๐Ÿ›ก License
MIT ยฉ 2025 Michele Gatti