You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/ui-heading/src/Heading/README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,15 @@ Heading is a component for creating typographic headings.
6
6
7
7
## Variant
8
8
9
-
Variant covers almost all use cases for headings on pages. Their name reflects the places they meant to be used. It sets the `level` prop and takes care of the style of the heading
10
-
We recommend using `variants` instead of the `level` (and `as`) props.
9
+
Variant covers almost all use cases for headings on pages. Their name reflects the places they meant to be used. It takes care of the style of the heading
11
10
12
-
NOTE: when `variant` is set, `level` and `as` props are ignored
11
+
NOTE 1: for legacy reasons, each `variant` has a default `level` set. This is not the recommended way and will be removed in a later major release. Please specify the `level` directly!
12
+
13
+
NOTE 2: when `variant` is set the `as` prop is ignored
14
+
15
+
IMPORTANT A11Y NOTE 1: there can be only one `h1` tag in a page
16
+
17
+
IMPORTANT A11Y NOTE 2: `h` tags can not skip a level, so for example an `h1` followed by an `h3` not allowed
0 commit comments