Hero Heading
HeroHeading
helps you create headings with eyebrows.
-->
HeroHeading
helps you create headings with eyebrows.
The HeroHeading
structure is built with accessibility in mind — you just have to include eyebrows with Eyebrow
if you want them.
Styling HeroHeading
is easy. You just have to tweak a couple of CSS properties and all your HeroHeading
elements will have a consistent look and feel.
Use HeroHeading-*
to align the entire hero heading (including the elements within) to the start
, center
, or end
- it’s just that easy!
No need to worry about realigning HeroHeading
items when you set a maximum width. We’ve got that covered.
By the way, all items in HeroHeading
have a max-width
of 100%
so you can just set width
instead of max-width
.
This doesn’t violate any best practice! Just resize the component and you’ll see everything function perfectly.
HeroHeading
contains two elements:
Eyebrow
: The text that goes before the main heading.It’s best to use a heading tag (h1
- h6
) with the HeroHeading
class and <span>
elements within. This keeps the entire heading accessible for screen readers.
Eyebrow
has the following values set by default.
We recommend changing these values in your CSS so you can use Eyebrow
in your headings without worrying about consistency. When you do so, feel free to add other properties as you deem fit.
If you have multiple hero headings, you can style them each with a tag or class — or both!
You can align HeroHeading
to the start, center, and end with HeroHeading-*
.
When you do this, HeroHeading
will reposition itself and its children items to the start
, center
or end
accordingly.
Each HeroHeading
and their children items have their max-width
set to 100%
by default, so you can simply set width
to change the length of your headings.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
HeroHeading
contains two elements:
Eyebrow
: The text that goes before the main heading.It’s best to use a heading tag (h1
- h6
) with the HeroHeading
class and <span>
elements within. This keeps the entire heading accessible for screen readers.
Eyebrow
has the following values set by default.
We recommend changing these values in your CSS so you can use Eyebrow
in your headings without worrying about consistency. When you do so, feel free to add other properties as you deem fit.
If you have multiple hero headings, you can style them each with a tag or class — or both!
You can align HeroHeading
to the start, center, and end with HeroHeading-*
.
When you do this, HeroHeading
will reposition itself and its children items to the start
, center
or end
accordingly.
Each HeroHeading
and their children items have their max-width
set to 100%
by default, so you can simply set width
to change the length of your headings.
Here’s the CSS for HeroHeading
.
The astro-island
and astro-slot
selectors help to alleviate styling frustrations when using Astro.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Here’s the CSS for HeroHeading
.
The astro-island
and astro-slot
selectors help to alleviate styling frustrations when using Astro.
Class | Description |
---|---|
Eyebrow | Eyebrow of the hero heading |
Variables | Default Value | Description |
---|---|---|
--gap | 0.5rem | Gap between Eyebrow and Heading text |
Variables | Default Value | Description |
---|---|---|
--eyebrow-size | 0.6em | Eyebrow’s font size |
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Class | Description |
---|---|
Eyebrow | Eyebrow of the hero heading |
Variables | Default Value | Description |
---|---|---|
--gap | 0.5rem | Gap between Eyebrow and Heading text |
Variables | Default Value | Description |
---|---|---|
--eyebrow-size | 0.6em | Eyebrow’s font size |