Skip to content

peerigon/uberschrift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e2d8de4 Β· Feb 28, 2025

History

45 Commits
Feb 28, 2025
Feb 25, 2025
Jan 12, 2024
Apr 23, 2024
Apr 23, 2024
Feb 28, 2025
Jan 11, 2024
Jan 11, 2024
Apr 23, 2024
Feb 21, 2024
Dec 1, 2022
Apr 24, 2024
Feb 25, 2025
Apr 23, 2024
Jan 11, 2024
Apr 23, 2024

Repository files navigation

<Hx>uberschrift 🧒</Hx>

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


uberschrift npm version badge
vueberschrift npm version badge
Issues Issue badge
CI status CI badge

πŸ› οΈ Usage

βš›οΈ React

npm install uberschrift

page.tsx:

import { Hx, HxBoundary } from "uberschrift";

<Hx>Outside of the top level: this will be an h1</Hx>

<HxBoundary>
  <Hx>Within the top level: this will be an h2</Hx>

  <HxBoundary>
    <Hx>Within the 2nd level: this will be an h3</Hx>

    <HxBoundary>
      <Hx>Within the 3rd level: this will be an h4</Hx>
    </HxBoundary>

    <Hx>Again within the 2nd level: this will be an h3</Hx>
  </HxBoundary>
</HxBoundary>

renders as:

<h1>Outside of the top level: this will be an h1</h1>
<h2>Within the top level: this will be an h2</h2>
<h3>Within the 2nd level: this will be an h3</h3>
<h4>Within the 3rd level: this will be an h4</h4>
<h3>Again within the 2nd level: this will be an h3</h3>

🌲 Vue.js

npm install vueberschrift

App.vue:

<script setup lang="ts">
  import { Hx, HxBoundary } from "vueberschrift";
</script>

<template>
  <Hx>Outside of the top level: this will be an h1</Hx>
  <HxBoundary>
    <Hx>Within the top level: this will be an h2</Hx>
    <HxBoundary>
      <Hx>Within the 2nd level: this will be an h3</Hx>
    </HxBoundary>
  </HxBoundary>
</template>

Sponsors


πŸ‘©β€πŸ’» Development

npm install
npx turbo dev
npx turbo test
npx turbo build