### Install Willow via NPM Source: https://context7.com/unumux/willow/llms.txt Commands to install the Willow library and an optional default theme as development dependencies. ```bash # Install Willow as a development dependency npm install --save-dev @unumux/willow # Optional: Install a theme npm install --save-dev @unumux/theme-unum-default ``` -------------------------------- ### Install Willow Theme NPM Package Source: https://github.com/unumux/willow/blob/master/README.md Optionally, install a provided theme as a development dependency. Replace 'theme-name-goes-here' with the actual theme name. ```bash npm install --save-dev @unumux/theme-name-goes-here ``` -------------------------------- ### Install Willow NPM Package Source: https://github.com/unumux/willow/blob/master/README.md Install Willow as a development dependency using npm. This method requires a tool to compile SCSS to CSS. ```bash npm install --save-dev @unumux/willow ``` -------------------------------- ### Willow-Card HTML Structure Examples Source: https://github.com/unumux/willow/blob/master/components/card/readme.md Provides two distinct HTML structures for the Willow-Card component: one using an `
` tag for actions and another using an `` tag for a clickable card. ```html

Heading Text

``` ```html

Heading Text

``` -------------------------------- ### Willow-Modal Close State Example Source: https://github.com/unumux/willow/blob/master/components/modal/readme.md This example demonstrates how to enable closing the modal by adding the 'data-modal-close="true"' attribute to the main modal section. This attribute controls the modal's closability. ```html
``` -------------------------------- ### HTML Snippets for Willow-Icons Source: https://github.com/unumux/willow/blob/master/components/icons/readme.md These examples demonstrate various Willow-Icons with different modifiers. Ensure a modifier class is added to the 'willow-icon' class for the icon to display. ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` ```html ``` -------------------------------- ### Import Willow Styles in SCSS Source: https://context7.com/unumux/willow/llms.txt Instructions for importing the theme and Willow styles, either as a full library or individual components. ```scss // Import theme before Willow (optional) @import "node_modules/@unumux/theme-unum-default/styles"; // Import entire Willow library @import "node_modules/@unumux/willow/styles"; // Or import individual components @import "node_modules/@unumux/willow/components/banner/styles/banner"; @import "node_modules/@unumux/willow/components/button/styles/button"; ``` -------------------------------- ### Implement Willow-Grid HTML Structure Source: https://github.com/unumux/willow/blob/master/components/grid/readme.md Basic grid structure and responsive configuration using modifier classes. ```html
``` -------------------------------- ### Implement Willow Grids Source: https://context7.com/unumux/willow/llms.txt The grid system supports responsive layouts with configurable column counts per breakpoint. ```html
``` -------------------------------- ### Accessible Icon in Actionable Element Source: https://github.com/unumux/willow/blob/master/components/icons/readme.md When an icon conveys meaning within an actionable component, add a 'title' attribute to the icon element for accessibility. This example shows a close icon within a button. ```html ``` -------------------------------- ### Willow-Grid with Modifiers Source: https://github.com/unumux/willow/blob/master/components/grid/readme.md Demonstrates how to use modifiers to control the number of columns per row for different screen sizes. ```APIDOC ## HTML Snippet - With Modifiers ### Description This example illustrates how to apply modifiers to the `willow-grid` class to define the number of columns displayed per row on specific screen sizes (medium and large in this case). ### Code ```html
``` ``` -------------------------------- ### Implement Skip Navigation Source: https://context7.com/unumux/willow/llms.txt Enable keyboard and screen reader users to bypass navigation by linking directly to the main content area. ```html
Skip to Content
``` -------------------------------- ### Import Entire Willow Library SCSS Source: https://github.com/unumux/willow/blob/master/README.md Include the entire Willow library's stylesheet in your primary SCSS file. This should be done after any theme imports. ```scss @import "node_modules/@unumux/willow/styles"; ``` -------------------------------- ### Implement Page Header Component Source: https://context7.com/unumux/willow/llms.txt Header component containing branding and navigation, with JavaScript for mobile menu toggling. ```html ``` -------------------------------- ### Implement Page Layout with Columns Source: https://github.com/unumux/willow/blob/master/README.md Use the willow-page-container class to wrap content and apply Bootstrap grid classes for responsive column layouts. ```html

Heading for content

``` -------------------------------- ### Include Willow Minified CSS Source: https://github.com/unumux/willow/blob/master/README.md Reference the downloaded minified Willow CSS file in your index.html. Use this method if you are not compiling SCSS. ```html ``` -------------------------------- ### Implement Page Container Component Source: https://context7.com/unumux/willow/llms.txt The root layout component that wraps all page content and supports flexbox utility classes. ```html
``` -------------------------------- ### Implement Willow Styling Context Source: https://github.com/unumux/willow/blob/master/components/styling-context/readme.md Wrap raw HTML or CMS placeholders within this div to apply Willow styling overrides. ```html
``` -------------------------------- ### Include Theme Minified CSS Source: https://github.com/unumux/willow/blob/master/README.md Reference the downloaded minified theme CSS file in your index.html. This single file includes both the theme and Willow styles. ```html ``` -------------------------------- ### Import Willow with Theme SCSS Source: https://github.com/unumux/willow/blob/master/README.md Import a theme's stylesheet before importing the Willow library. This ensures components are styled with the theme's design. ```scss @import "node_modules/@unumux/theme-name-here/styles"; @import "node_modules/@unumux/willow/styles"; ``` -------------------------------- ### Implement Page Footer Component Source: https://context7.com/unumux/willow/llms.txt Footer component for displaying site branding, navigation, and copyright information. ```html ``` -------------------------------- ### Implement Global Alert HTML Source: https://github.com/unumux/willow/blob/master/components/global-alert/readme.md Standard structure for a global alert component, including variants for positive, warning, and negative feedback. ```html ``` -------------------------------- ### Implement Primary Navigation Source: https://context7.com/unumux/willow/llms.txt Place this component within the page header to provide access to main site sections. ```html ``` -------------------------------- ### Implement Secondary Navigation Source: https://context7.com/unumux/willow/llms.txt Use this component within the page content area to provide contextual links for the current section. ```html ``` -------------------------------- ### Apply dynamic icon via style attribute Source: https://github.com/unumux/willow/blob/master/components/banner/readme.md Method for setting a unique icon background image dynamically using an inline style attribute. ```html
``` -------------------------------- ### Willow SCSS Mixins Source: https://github.com/unumux/willow/blob/master/utilities.md Mixins for component styling. ```APIDOC ## SCSS Mixins ### icon($type) Sets background-image, height, and width for icons based on the provided type. ### set-button-style($modifier, $state) Sets button properties (background-color, border, color) based on modifier and state. ``` -------------------------------- ### Breakpoint Function for Media Queries Source: https://github.com/unumux/willow/blob/master/utilities.md Use the `breakpoint` function within a `@media` query to dynamically set minimum widths based on a breakpoint map. The parent must be a flex parent. ```SCSS @media screen and (min-width: breakpoint(sm, $grid-breakpoints)) { ... } // compiles to @media screen and (min-width: 576px) { ... } // map used $grid-breakpoints: ( xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px ) ``` -------------------------------- ### Import Single Willow Component SCSS Source: https://github.com/unumux/willow/blob/master/README.md Import stylesheets for individual Willow components to include only specific components in your project. ```scss @import "node_modules/@unumux/willow/components/banner/styles/banner"; @import "node_modules/@unumux/willow/components/breadcrumbs/styles/breadcrumbs"; ``` -------------------------------- ### Implement Page Content Component Source: https://context7.com/unumux/willow/llms.txt Main content area component designed to be placed between the header and footer, utilizing flex-grow for layout. ```html

Welcome to Our Site

Your content goes here.

``` -------------------------------- ### Willow Utility Classes Source: https://github.com/unumux/willow/blob/master/utilities.md CSS utility classes for layout and accessibility. ```APIDOC ## CSS Utility Classes ### .butter Removes margin between two adjacent .butter elements or components. ### .flex-grow Applies flex-grow to a component or element to fill available space (requires flex parent). ### .sr-only Visually hides information intended only for screen readers. ``` -------------------------------- ### Icon Mixin Source: https://github.com/unumux/willow/blob/master/utilities.md Apply icon styles using the `icon` mixin. Pass one of the predefined `$type` variables to set background-image, height, and width properties. ```SCSS .my-alert--positive { &:before { @include icon($icon-success); } } /* properties set: background-image: ...; height: ...; width: ...; */ ``` -------------------------------- ### Implement Willow-Footer-Nav HTML structure Source: https://github.com/unumux/willow/blob/master/components/footer-nav/readme.md Standard HTML markup for the footer navigation component. Includes accessibility roles and screen-reader-only headings. ```html ``` -------------------------------- ### Implement Global Alert Component Source: https://context7.com/unumux/willow/llms.txt Global alerts support positive, warning, and negative variants. The close function includes local storage persistence to track dismissal. ```html ``` -------------------------------- ### Style Buttons with Set Button Style Mixin Source: https://context7.com/unumux/willow/llms.txt Style buttons for different states (default, hover, focus) using the set-button-style mixin with color and state parameters. ```scss // Button style mixin .my-button--primary { @include set-button-style($primary, "default"); &:hover { @include set-button-style($primary, "hover"); } &:focus { @include set-button-style($primary, "focus"); } } ``` -------------------------------- ### Implement Dialog Component Source: https://context7.com/unumux/willow/llms.txt Dialogs support closing via escape key, outside clicks, or specific actions. Ensure the JavaScript event listeners are initialized to handle these interactions. ```html
``` -------------------------------- ### Implement Willow-Skip-Nav HTML Source: https://github.com/unumux/willow/blob/master/components/skip-nav/readme.md Basic HTML structure for the skip navigation component. Ensure the href attribute matches the ID of the main content container. ```html
Skip to Content
``` -------------------------------- ### Implement Willow-Dialog HTML Structure Source: https://github.com/unumux/willow/blob/master/components/dialog/readme.md Standard HTML structure for a dialog component, including the container, heading, content area, and action list. ```html
``` -------------------------------- ### Apply Flex Grow to Page Content Source: https://github.com/unumux/willow/blob/master/components/page-container/readme.md Use the flex-grow utility class on child elements to fill available vertical space. ```HTML
``` -------------------------------- ### Power Function for Ratios Source: https://github.com/unumux/willow/blob/master/utilities.md Calculate powers of a given ratio using the `pow` function. The `$ratio` should be a constant throughout your project, and `$exponent` must be a positive whole number. ```SCSS $golden-ratio: 1.618; $golden-ratio-l: pow($golden-ratio, 2); $golden-ratio-xl: pow($golden-ratio, 3); ``` -------------------------------- ### Willow-Grid Basic Structure Source: https://github.com/unumux/willow/blob/master/components/grid/readme.md This snippet shows the basic HTML structure for a Willow-Grid and its items. ```APIDOC ## HTML Snippet - Basic Structure ### Description This is the fundamental HTML structure for implementing the Willow-Grid component. It consists of a parent `div` with the class `willow-grid` and child `div` elements with the class `willow-grid__item` where content is placed. ### Code ```html
``` ``` -------------------------------- ### Implement Willow Page Container Source: https://github.com/unumux/willow/blob/master/components/page-container/readme.md Basic HTML structure for the page container component. ```html
``` -------------------------------- ### Implement Willow-Banner HTML structure Source: https://github.com/unumux/willow/blob/master/components/banner/readme.md Standard HTML markup for the banner component, including required container-fluid and accessibility roles. ```html

Heading Text

``` -------------------------------- ### Willow SCSS Functions Source: https://github.com/unumux/willow/blob/master/utilities.md Mathematical and layout-related SCSS functions. ```APIDOC ## SCSS Functions ### breakpoint($breakpoint, $breakpoint-map) Returns a pixel value from a breakpoint map for use in @media queries. ### line-height($font-size) Returns a unitless line-height value based on theme settings. ### pow($ratio, $exponent) Returns the value of $ratio multiplied by itself $exponent times. ### space($scale) Calculates spacing based on the base variable and golden ratio. ### strip-unit($number) Removes units from a number (e.g., 10px becomes 10). ``` -------------------------------- ### Implement Breadcrumbs Source: https://context7.com/unumux/willow/llms.txt Display the user's current location within the site hierarchy using this navigation path. ```html ``` -------------------------------- ### Customize Willow Theme with SCSS Variables Source: https://context7.com/unumux/willow/llms.txt Override default SCSS variables before importing the theme to globally customize component appearance. This includes colors, sizes, and grid configurations. ```scss // Custom color variable $my-brand-color: #37c0e3; // Override component-specific variables $component-button-positive-background-color: $my-brand-color; $component-banner-background-color: #f5f5f5; $component-page-container-max-width: 1400px; // Customize Bootstrap grid $grid-columns: 10; // Import theme (must come after variable overrides) @import "node_modules/@unumux/theme-unum-default/styles"; // Import Willow @import "node_modules/@unumux/willow/styles"; ``` -------------------------------- ### Willow-Logo-Link Component Source: https://github.com/unumux/willow/blob/master/components/logo-link/readme.md Documentation for the willow-logo-link HTML structure and its required elements. ```APIDOC ## Willow-Logo-Link Component ### Description The willow-logo-link component displays a logo and wraps it in an anchor tag pointing to the home page. ### Elements #### willow-logo-link - Required: Yes - Notes: Must include an `aria-label` for accessibility. #### willow-logo-link__image - Required: Yes - Notes: Requires a `src` attribute for the image path and an `alt` attribute for accessibility. ### HTML Example ```html Company Logo ``` ``` -------------------------------- ### Implement Modal Component Source: https://context7.com/unumux/willow/llms.txt Modals halt user interaction and require explicit action to close. Use the provided JavaScript functions to manage the modal state via data attributes. ```html

Confirm Deletion

Are you sure you want to delete this item? This action cannot be undone.

``` -------------------------------- ### set-text-style Mixin Source: https://github.com/unumux/willow/blob/master/utilities.md Applies predefined font styles and values to text elements. Accepts various text style variables. ```APIDOC ## `set-text-style($style)` ### Description Sets font properties and values for the provided font/text `$style`. ### Method SCSS Mixin ### Parameters #### Arguments - **$style** (variable) - Required - The text style variable to apply. Possible values include: - `$text-style-heading-1` - `$text-style-heading-2` - `$text-style-heading-3` - `$text-style-heading-4` - `$text-style-heading-5` - `$text-style-heading-6` - `$text-style-content-1` - `$text-style-content-2` - `$text-style-content-3` ### Request Example ```scss body { @include set-text-style($text-style-content-1); } h1 { @include set-text-style($text-style-heading-1); } small { @include set-text-style($text-style-content-3); } .my-component__heading { @include set-text-style($text-style-heading-3); } ``` ### Response #### Properties Set - `font-family` - `font-size` - `font-weight` - `line-height` - Responsive adjustments for `font-size` and `line-height` at `breakpoint(medium)`. ``` -------------------------------- ### Set Text Style with set-text-style Mixin Source: https://github.com/unumux/willow/blob/master/utilities.md Use this mixin to apply predefined font styles to elements. It accepts various text style variables like `$text-style-heading-1` or `$text-style-content-1`. ```SCSS body { @include set-text-style($text-style-content-1); } h1 { @include set-text-style($text-style-heading-1); } small { @include set-text-style($text-style-content-3); } .my-component__heading { @include set-text-style($text-style-heading-3); } /* properties set: font-family: ...; font-size: ...; font-weight: ...; line-height: ...; @media screen and (min-width: breakpoint(medium)) { font-size: ...; line-height: ...; } */ ``` -------------------------------- ### Implement Willow Cards Source: https://context7.com/unumux/willow/llms.txt Cards group related information and can be implemented as article elements with actions or as clickable link cards. ```html

Product Name

Brief product description that entices users to learn more about this item.

Article Title

Brief summary of the article content...

``` -------------------------------- ### Make Element Fill Available Flex Space Source: https://context7.com/unumux/willow/llms.txt Use the flex-grow utility class to make an element expand and fill available space within a flex container. ```html
``` -------------------------------- ### Willow-Icon Component Source: https://github.com/unumux/willow/blob/master/components/icons/readme.md Documentation for the willow-icon element, including usage, modifiers, and accessibility requirements. ```APIDOC ## willow-icon ### Description The willow-icon component provides a set of symbols for UI interfaces. It requires a modifier class to render a specific icon. ### Usage - Must have a modifier added to the class name (e.g., `willow-icon--menu`). - If used to convey meaning in an actionable component, add a `title` attribute for accessibility. ### Modifiers - `--menu`: Hamburger menu icon. - `--menu-inverse`: Inverse color menu icon. - `--menu-close`: Close icon for menus. - `--menu-close-inverse`: Inverse color menu close icon. - `--close`: Close icon for alerts/dialogs. - `--close-inverse`: Inverse color close icon. - `--info`: Information symbol. - `--info-inverse`: Inverse color info symbol. - `--success`: Checkmark symbol. - `--success-inverse`: Inverse color success symbol. - `--warning`: Yield symbol. - `--warning-inverse`: Inverse color warning symbol. - `--error`: Exclamation point symbol. - `--error-inverse`: Inverse color error symbol. ### Example ``` -------------------------------- ### Basic HTML Structure for Willow-Modal Source: https://github.com/unumux/willow/blob/master/components/modal/readme.md This snippet shows the fundamental HTML structure for the Willow-Modal component. It includes the main container, section, heading, content area, and actions list. ```html

Modal

``` -------------------------------- ### Apply Text Styles with Set Text Style Mixin Source: https://context7.com/unumux/willow/llms.txt Apply predefined text styles to elements using the set-text-style mixin, referencing defined text style variables. ```scss // Text style mixin body { @include set-text-style($text-style-content-1); } h1 { @include set-text-style($text-style-heading-1); } ``` -------------------------------- ### Use Breakpoint Function in Media Queries Source: https://context7.com/unumux/willow/llms.txt Utilize the breakpoint function to define responsive media queries based on predefined breakpoints. ```scss // Breakpoint function for media queries @media screen and (min-width: breakpoint(md, $grid-breakpoints)) { .my-component { display: flex; } } ``` -------------------------------- ### Basic HTML Structure for Willow-Page-Footer Source: https://github.com/unumux/willow/blob/master/components/page-footer/readme.md This HTML snippet shows the fundamental structure of the Willow-Page-Footer component. It includes placeholders for branding, navigation, and copyright information. Ensure this component is used only once per page and placed after the willow-page-content. ```html
``` -------------------------------- ### Implement Willow Banners Source: https://context7.com/unumux/willow/llms.txt Banners provide full-width highlighted sections for important announcements or calls to action. ```html

Special Announcement

Important message for all visitors about our new services and offerings.

``` -------------------------------- ### Apply Screen Reader Only Class Source: https://context7.com/unumux/willow/llms.txt Visually hide content but keep it accessible to screen readers using the sr-only utility class. ```html .my-navigation__heading { @include sr-only; } ``` -------------------------------- ### Visually Hide Content for Screen Readers Source: https://context7.com/unumux/willow/llms.txt Use the sr-only utility class to visually hide content while ensuring it remains accessible to screen readers. ```html

Site Primary Menu

``` -------------------------------- ### Primary Navigation HTML Structure Source: https://github.com/unumux/willow/blob/master/components/primary-nav/readme.md This snippet shows the basic HTML structure for the primary navigation. Ensure links have appropriate href and aria-label values for accessibility. ```html ``` -------------------------------- ### Implement Inline Alert Components Source: https://context7.com/unumux/willow/llms.txt Use these contextual message blocks for forms or content areas. Apply specific modifier classes for positive, warning, or negative states. ```html ``` -------------------------------- ### Willow-Summary HTML Structure Source: https://github.com/unumux/willow/blob/master/components/summary/readme.md This is the basic HTML structure for the Willow-Summary component. It includes a heading, a content area for the willow-grid, and an actions list. ```html

Heading Text

``` -------------------------------- ### Apply Spacing with Space Function Source: https://context7.com/unumux/willow/llms.txt Use the space function to apply consistent spacing values, calculated using the golden ratio, to elements. ```scss // Space function using golden ratio .my-component { margin-top: space(2); // Returns 4.1886rem padding: space(1); // Returns 2.589rem } ``` -------------------------------- ### Implement Willow Buttons Source: https://context7.com/unumux/willow/llms.txt Use button elements for form actions and anchor tags for navigation. Apply specific class modifiers to achieve different visual variants. ```html Sign Up Login Disabled ```