Storybook Structure - NCIOCPL/ncids GitHub Wiki

The following will be the structure for the Storybook. It will be reflected in the NCIDS for All Documentation Site and Figma files for consistency in the user experience.

For each component, there should be a Default, followed by its variants/modifiers. If necessary for the components, also group any examples together and group any test cases together. Use your best judgement as to what is most beneficial for the end user to interact with

Definitions

  • Default: The component without any variants or modifiers, e.g. site alert
  • Variants: The same component, but with enough structural HTML changes it becomes special. It's purpose does not change, so it does not warrant a new component. E.g., slim site alert
  • Modifiers: Modifications that can be applied to any of the variants. E.g. emergency default site alert, info slim slit alert
  • Test Cases: Any component variation with any modifiers that may be missing. Patterns will go here. E.g. Dismissible emergency site default alert with two column links

Example structure

NCIDS

  • Component
    • Default
    • Variants
    • Modifiers
    • Test Cases
      • Cgov - when there is a strong need to test Cgov HTML with NCIDS JS
      • USWDS - when there is a need to test USWDS HTML with NCIDS JS

USWDS Passthroughs

  • USWDS
    • Components
      • ??? - Duplication of USWDS stories

Components

📁 Accordion**
  • 📁 Default
    • Default
    • Default - Multiselectable
  • 📁 Variants
    • 📁 Bordered
      • Bordered
      • Bordered - Multiselectable
  • 📁 Test Cases
    • 📁 Basic HTML
      • Nested Example
      • No JS
    • 📁 Cancer.gov HTML
      • Sample Article
      • Nested
      • No JS
    • 📁 USWDS *
📁 Autocomplete
📁 Banner
📁 Breadcrumb
  • 📁 Default
  • 📁 Variants
  • 📁 Test Cases
    • Default with Very Long Content
    • Wrap with Very Long Content
📁 Button
  • 📁 Default
    • Default Button (Primary, Secondary, Accent Cool, Accent Warm, Base)
    • Default Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base)
  • 📁 Modifiers
    • 📁 Size
      • 📁 Big
        • Big Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
        • Big Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
      • 📁 Small
        • Small Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
        • Small Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
    • 📁 Full Width
      • Full Width Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
      • Full Width Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
    • 📁 Icon
      • 📁 Icon, left
        • Icon, left Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
        • Icon, left Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
      • 📁 Icon, right
        • Icon, right Button (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
        • Icon, right Anchor (Primary, Secondary, Accent Cool, Accent Warm, Base, Outline Primary, Outline Secondary, Outline Inverse)
  • 📁 Variants
    • 📁 Outline
      • Outline Button (Outline Primary, Outline Secondary, Outline Inverse)
      • Outline Anchor (Outline Primary, Outline Secondary, Outline Inverse)
    • 📁 Unstyled
      • Unstyled (Default; Big; Small; Full Width; Icon, Left; Icon, Right)
  • 📁 Test Cases
    • Unsupported Outline Colors (Primary, Secondary, Accent Cool, Accent Warm, Base)
📁 Card
📁 Collection
  • 📁 Default
    • Default
    • Media
    • Calendar
  • 📁 Variants
    • Condensed
📁 CTA Strip
📁 Footer
📁 Guide Card
  • 📁 Default
    • Default
    • Card Group
  • 📁 Variants
    • 📁 Guide Card with Image and Description
  • 📁 Test Cases
    • Guide Card with Image and Description without Description
    • Guide Card with Image and Description without Image
    • Title Aligned Card Group without Description
    • Title Aligned Card Group without Image
📁 Header
📁 Hero
📁 List
  • 📁 Default
    • Ordered List
    • Unordered List
  • 📁 Modifiers
    • Two-Column List (Note: This needs to be created)
    • Unstyled List
📁 Promo Block
  • 📁 Default
  • 📁 Modifiers
    • 📁 Dark Theme
      • Default
      • With Image
    • 📁 Alternating Image Right
      • With Image
      • Dark Theme With Image
  • 📁 Variants
  • 📁 Test Cases
    • Default No Description
    • Default With Image No Description
📁 Side Navigation
📁 Site Alert
  • 📁 Default
    • Default
    • Dismissible
  • 📁 Modifiers
    • 📁 Emergency
      • Emergency default
      • Emergency slim
      • Dismissible emergency default
      • Dismissible emergency slim
    • 📁 Info
      • Info default
      • Info slim
      • Dismissible info default
      • Dismissible emergency slim
  • 📁 Variants
    • Slim
    • Dismissible
  • 📁 Test Cases
    • Emergency default with two column list
    • Info default with two column list
📁 Skipnav
📁 Summary Box
  • 📁 Default
    • Default
  • 📁 Test Cases
    • Summary Box Row

NCI Components (old)

nci-autocomplete

nci-card

Collection

  • Default
    • Example (no media or calendar)
    • Example with media
    • Example with calendar
  • Variants
    • Condensed
  • Modifers
  • Test Cases
    • USWDS Default
    • USWDS Fancy
    • USWDS Media
    • USWDS Only Headers

nci-cta-strip

nci-guide-card

nci-header*

nci-hero

Promo Block

usa-sign-up (Formerly known as nci-subscribe)

We need to figure out what to do about this. It is not exactly a standalone component. It exists in the usa-footer. So we should probably consider deleting the documentation site page, or fixing this issue.

usa-banner*

usa-breadcrumb

  • Default
  • Wrap
  • Test Cases
    • Create test case with really long content

Button

usa-footer*

usa-intro

This should probably move to the uswds pass throughs. IDK why it is here.

usa-section

usa-sidenav*

usa-site-alert*

This is another one of those "our very first component" and we should really re-evaluate some of our life choices. I dare say the component is kind of broken and we should look at patching or replacing some of the USWDS defaults. This should really have a modifier for size, Standard or Slim and a modifier for colors. The colors should probably behave like USWDS.

usa-skipnav

LEGEND

  • *This class has no default yet
  • Storybook needs JS enabled.
  • ††Story should be deleted once JS is enabled.

Design-Tokens

Templates

USWDS Components

⚠️ **GitHub.com Fallback** ⚠️