npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@springernature/nature-section-heading

v4.0.0

Published

Nature Section Heading

Downloads

6

Readme

Nature Section Heading

NPM version

The Nature Section heading is a type of heading used for titles of some subsections of pages on Nature.com.

It uses borders to make it stand out from other headings on the page.

When to use this component

Use the Nature Section heading when you want to organise multiple pieces of content into a section on a landing page. For example, a group of cards linking to articles on a similar subject.

When not to use this component

When you need to break up content on article pages into chunks, use default heading styles.

How it works

Write clear, descriptive headings using sentence case.

Section headings with and without a top border

There are 2 styles of Section heading:

  • one with a top and botton border - this is set as an <h2> heading level
  • one with a bottom border and no top border - this is designed for sub-headings and is set at heading level <h3>

If you need to change the default heading level of a Section heading, you can do this using the heading level with the aria-level property. The level should be a string, not an integer.

To make our sites accessible, you must always use heading levels correctly to communicate page structure.

Section headings as links

You can use a Section heading to link to another page.

If you're using the handlebars template and you add a link, the heading will render a chevron after the heading text to show users that they can click on it.

Section heading with a right-arrow chevron after the heading text

If you're not using the handlebars template, you'll need to style it yourself using the source code for the chevron svg icon.

Installation

To use the Section heading component, enter the following command in your Terminal:

npm install @springernature/nature-section-heading

Usage

Then import the installed component code in your scss file:

// settings
@import '@springernature/nature-section-heading/scss/10-settings/section-heading';
// component
@import '@springernature/nature-section-heading/scss/50-components/section-heading';

Once you’ve installed the scss, build your Section heading using the following HTML as a guide.

Template

Find a configurable template in the Section heading's view folder.

See an example in the Section heading's demo folder.

Help improve this page

If you’ve got a question, idea or suggestion about how to improve this component or guidance, post in the #design-systems Slack channel.