Project: The Ashgrove Component Kit

The borrowing FAQ is now a kit component, with three tokens, a place in the components layer, states read from [open], and a written contract. Kwame wants that for the whole site, so volunteers adding pages for the sharpening clinic and seed swap can reuse components without copying CSS.

This lesson is Kwame’s brief for the whole kit. It says what to build and how to check each piece. It leaves out the implementation steps, since you’ve built every pattern here once already.

Read Kwame’s Brief

The component kit is a small set of components, each with its own CSS file, tokens, and contract, that any page can use as is or restyle through its tokens.

Start from the start folder in this project’s code download. It holds the site as the last section left it, with base.css, faq.css, and a styles.css that layers them, plus three things the kit needs:

  • step-ladder.html: The ladder’s specs as a plain paragraph under its heading, and a Borrow It section ending in a plain link.
  • borrow.html: The borrowing form, with labels and instructions but nothing tying them together.
  • borrow-problem.html: The page a server would return when Tomasz Nowak gets two fields wrong, with its errors in plain paragraphs. Open it directly, since no server comes with the project.

To carry on from your own site instead, copy borrow.html and borrow-problem.html from the start folder into it, and the ladder’s specs paragraph and Borrow It section from the start folder’s step-ladder.html into yours.

The finished kit has these stylesheets:

Language: Text
styles.css
tokens.css
base.css
nav.css
faq.css
dialog.css
popover.css
form.css

Their rules come from Design a Component’s Interface:

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.