Skip to content

useContentHeadline

Introduction

TIP

Optionally, the component <ContentHeadline> can also be used as a wrapper.

useContentHeadline() is used to display the headline structure.

Example: h1, h2, h3, h4, h5, h6

The level of the heading is taken from useContentContainer() or ContentContainer.

The deeper the nesting, the smaller the heading.

vue
<template>
  <component :is="currentTag">
    <slot />
  </component>
</template>

<script setup>
import { useContentHeadline } from 'vue-semantic-structure';

const { currentTag } = useContentHeadline();
</script>

Options

PropertyTypeDescriptionDefault Value
tagStringTag for the elementundefined

Return

PropertyTypeDescription
currentTagStringGet current html tag.
currentLevelNumberGet current level.