# vertically-aligned

> vertically align content on html (native)

Latest version **2.0.0** (published 2020-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install vertically-aligned
pnpm add vertically-aligned
yarn add vertically-aligned
bun add vertically-aligned
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-07-08 |
| First published | 2020-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 190.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | lucas.aragno157@gmail.com |
| Maintainers | lucas.aragno |
| Keywords | vertically align, web component, react |

## Links

- npm: https://www.npmjs.com/package/vertically-aligned
- Repository: https://github.com/lucas-aragno/vertically-aligned
- Homepage: https://github.com/lucas-aragno/vertically-aligned#readme
- Issues: https://github.com/lucas-aragno/vertically-aligned/issues
- npm.io page: https://npm.io/package/vertically-aligned

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-07-08

## README

# Vertically Aligned

Small (<1kb) and native web component designed to verically align elements on a page.

## Why?

Seems like vertically align is still an issue? I still see a lot of people joking/complaining about this, so I guess this component will have an audience.

![jokes](docs/tweets.png)

## Install it as a module:

```bash
npm install @lucas-aragno/vertically-aligned@2.0.0
```

## How to use it

On your regular websites just include the script and use the component

```html
    <vertically-aligned>
      <h1> content !!! </h1>
    </vertically-aligned>
```

On react,preact and similar frameworks you can import the component and use it:

```javascript

import React, { Component } from 'react';
import 'vertically-aligned';

class HelloWorld extends Component {
  render() {
    return (
      <vertically-aligned>
       <h1>Hello World, React!</h1>
      </vertically-aligned>
  ); 
  } 
} 

export default HelloWorld;
```

That should output something like this:

<p align="center">
  ![demo image](docs/react.png)
</p>

## No Flex? No problem!

Add the attribute `noFlex` to the HTML tag and it will use table styles.

```html
    <vertically-aligned noFlex>
      <h1> content !!! </h1>
    </vertically-aligned>
```

---
_Source: https://npm.io/package/vertically-aligned · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
