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

https://github.com/peerigon/uberschrift

Magic heading levels for React
https://github.com/peerigon/uberschrift

Last synced: 11 months ago
JSON representation

Magic heading levels for React

Awesome Lists containing this project

README

          

# `uberschrift ๐Ÿงข`

**Zero-dependency magic heading levels for React and Vue.js**

---

| | |
| ----------- | ------------------------------------------------------------ |
| uberschrift | [![npm version badge](https://img.shields.io/npm/v/uberschrift?style=flat-square)](https://npmjs.com/package/uberschrift) |
| vueberschrift | [![npm version badge](https://img.shields.io/npm/v/vueberschrift?style=flat-square)](https://npmjs.com/package/vueberschrift) |
| Issues | [![Issue badge](https://img.shields.io/github/issues/peerigon/uberschrift?style=flat-square)](https://github.com/peerigon/uberschrift/issues) |
| CI status | [![CI badge](https://github.com/peerigon/uberschrift/actions/workflows/ci.yml/badge.svg)](https://github.com/peerigon/uberschrift/actions/workflows/pull_request.yml) |

---

## [๐Ÿ“– Full Documentation](https://uberschrift.peerigon.io)

## ๐Ÿ› ๏ธ Usage

### โš›๏ธ React

```sh
npm install uberschrift
```

`page.tsx`:

```tsx
import { Hx, HxBoundary } from "uberschrift";

Outside of the top level: this will be an h1

Within the top level: this will be an h2


Within the 2nd level: this will be an h3


Within the 3rd level: this will be an h4

Again within the 2nd level: this will be an h3

```

renders as:

```html

Outside of the top level: this will be an h1


Within the top level: this will be an h2


Within the 2nd level: this will be an h3


Within the 3rd level: this will be an h4


Again within the 2nd level: this will be an h3


```

### ๐ŸŒฒ Vue.js

```sh
npm install vueberschrift
```

`App.vue`:

```html

import { Hx, HxBoundary } from "vueberschrift";

Outside of the top level: this will be an h1

Within the top level: this will be an h2

Within the 2nd level: this will be an h3

```

---

## Sponsors

[](https://peerigon.com)

---

## ๐Ÿ‘ฉโ€๐Ÿ’ป Development

```sh
npm install
npx turbo dev
npx turbo test
npx turbo build
```