vue-accessible-headings
is a Vue library that provides two useful components; v-h
and v-section
.
This library is inspired by awesome prior art, react-headings
and react-accessible-headings
.
v-h
is a component to represent a heading element in your document. If you put v-h
in your app, it will automatically turn into one of h1
, h2
, h3
, h4
, h5
, or h6
. The number depends on how much you nest v-section
in the parent.
v-section
is a component to represent a section in your document. It is often a landmark element such as header
, main
, footer
but could also be a subordinate topic of your article.
You always have to include at least one v-h
inside this component. Otherwise, heading level will be skipped which makes the outline of your document inconsistent.
MIT