### Example URL with Query String Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_ia/url-standards.md Demonstrates a typical URL structure including a query string with multiple parameters. The '?' signifies the start of the query string, and parameters are separated by '&'. ```text https://www.va.gov/search/?page=1&query=disability+compensation&t=true ``` -------------------------------- ### Install Dependencies (Bash) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/CLAUDE.md These commands are used to set up the development environment by installing necessary Node.js and Ruby dependencies. Ensure you have Node.js and Ruby installed before running. ```bash # Setup yarn install # Install Node dependencies bundle install # Install Ruby gems (requires Ruby 3.3.8) ``` -------------------------------- ### Install Component Library using Yarn Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/install.md Installs the VA Design System's Web Component library package into your project using yarn. This dependency provides the reusable web components. ```bash yarn add @department-of-veterans-affairs/component-library ``` -------------------------------- ### Grid Layout Examples (HTML) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/layout/html/grid.html Demonstrates various column layouts using HTML for a grid system. These examples showcase different fractions of the grid, such as one half, one third, and one fourth, typically used for content structuring. ```HTML
One Half
One Half
One Third
One Third
One Third
One Fourth
One Fourth
One Fourth
One Fourth
``` -------------------------------- ### Install Dependencies for Analytics Reports Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/scripts/metrics/MONTHLY-REPORTS.md Installs ImageMagick and Ghostscript, which are required for processing PDF reports into images. These are one-time setup commands. ```bash brew install imagemagick ghostscript ``` -------------------------------- ### Build and Start Jekyll Server Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/README.md Builds the Jekyll site and starts a local development server. This command allows you to preview the documentation site locally. An alternative command is provided if Storybook is not being used. ```bash yarn start:storybook-static ``` ```bash yarn start ``` -------------------------------- ### Install Project Dependencies with Yarn Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/README.md Installs all the necessary project dependencies using the Yarn package manager. This command should be run after cloning the repository. ```bash yarn install ``` -------------------------------- ### Start Storybook Server for Component Previews Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/README.md Starts the Storybook server, which provides interactive previews of the design system components. This command should be run in a separate terminal window within the component-library/packages/storybook directory. ```bash yarn static-storybook-server ``` -------------------------------- ### va-pagination Web Component Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/pagination.md Demonstrates various configurations of the va-pagination web component. These examples showcase default, middle, last, unbounded, and internationalization scenarios. ```html ``` -------------------------------- ### HTML Padding Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/padding.md Demonstrates the application of various padding utility classes for different sides and breakpoints. These examples show how to structure HTML to utilize the system's spacing utilities. ```html

.vads-u-padding-2

.vads-u-padding-top-2

.vads-u-padding-bottom-2

.vads-u-padding-right-2

.vads-u-padding-left-2

.vads-u-padding-x-2

.vads-u-padding-y-2

``` -------------------------------- ### Start Development Server (Bash) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/CLAUDE.md Commands to build and serve the documentation site locally. `yarn start` builds and serves the site, while `yarn watch` builds with incremental updates for faster development feedback. ```bash # Development yarn start # Build and serve at localhost:4000 yarn watch # Build with incremental updates yarn build # Run Gulp build pipeline only ``` -------------------------------- ### Start Jekyll Development Server Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/scripts/metrics/README.md Command to start the local Jekyll development server. This is used to preview the website, including the metrics dashboard, locally. ```bash yarn start ``` -------------------------------- ### Basic Component Naming and URL Path Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/naming/index.md Provides examples of basic web component names, their documentation titles, and their associated URL paths, showcasing a flat naming structure for simpler components. ```html Web Component Documentation Title URL Path va-alert Alert /components/alert va-alert-expandable Alert - Expandable /components/alert-expandable va-modal Modal /components/modal va-pagination Pagination /components/pagination ``` -------------------------------- ### Install Ruby Gems for Jekyll Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/README.md Installs the required Ruby gems for the Jekyll build process. This step is necessary if you are building the documentation site locally with Jekyll. ```bash bundle install ``` -------------------------------- ### Link Action for Minimal Header Example Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/header/minimal.md This snippet demonstrates how to create a secondary link action that directs users to an example of the minimal header. It's useful for providing direct access to a live demonstration. ```html ``` -------------------------------- ### Include Component Example Image Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/template.md Embeds an example image of a component in use, with associated alt text and a caption. This helps users visualize the component in a real-world context. ```html ``` -------------------------------- ### Install CSS-Library using Yarn Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/install.md Installs the VA Design System CSS-Library package into your project using the yarn package manager. This is the first step to integrating the CSS-Library's styles and utilities. ```bash yarn add @department-of-veterans-affairs/css-library ``` -------------------------------- ### HTML Link Formatting Example - Vets Design System Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_content-style-guide/links.md Demonstrates correct and incorrect HTML structures for link lists. The 'like this' example shows a link placed on its own line for clarity, while the 'not this' example illustrates how to avoid linking each list item individually to the same destination, which can be confusing. ```html

Like this

__Use natural language, and link relevant words__ If your disability gets worse, you can file for an increase in compensation. [File for a VA disability compensation increase](https://va.gov/disability/how-to-file-claim/) Apply for a United States burial flag to place over a casket or coffin, or place with an urn. [Learn more about burial flags](https://www.va.gov/burials-memorials/memorial-items/burial-flags/)

Not this

__Avoid "click here" and generic CTA text__ [Click here](https://va.gov/disability/how-to-file-claim/) to file for a VA disability compensation increase if your disability gets worse. Apply for a United States burial flag to place over a casket or coffin, or place with an urn. [Learn more](https://www.va.gov/burials-memorials/memorial-items/burial-flags/)
``` ```html Put links on their own line Check COVID-19 symptoms on the CDC website ``` ```html Avoid linking each item in a list to the same destination ``` -------------------------------- ### Import Component Library Global CSS Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/install.md Imports the global CSS file from the installed component library. This ensures that the base styles for all web components are loaded into your application. ```javascript import "@department-of-veterans-affairs/component-library/dist/main.css"; ``` -------------------------------- ### Sign-in Alert Examples - Nunjucks Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/alert/alert-sign-in.md This Nunjucks include demonstrates various examples of the Sign-in Alert component, showcasing different use cases and configurations for user sign-in flows. ```html {% include content/sign-in-alert-examples.md %} ``` -------------------------------- ### HTML Lists Examples - VA Design System Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/list.md Demonstrates simple and complex unordered and ordered lists using HTML. These examples are intended for frontend developers to integrate list structures into VA.gov. ```html
{% include_relative html/lists.html %}
{% include_relative html/unordered-list-decision-letters.html %}
``` -------------------------------- ### Import CSS-Library Stylesheets Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/install.md Imports the core CSS, typography, and utility stylesheets from the installed CSS-Library. These imports should be placed in your project's main CSS or SCSS file. ```css @import "@department-of-veterans-affairs/css-library/dist/stylesheets/core"; @import "@department-of-veterans-affairs/css-library/dist/stylesheets/uswds-typography"; @import "@department-of-veterans-affairs/css-library/dist/stylesheets/utilities"; ``` -------------------------------- ### Web Component Naming and URL Path Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/naming/index.md Demonstrates the relationship between web component tags, their corresponding documentation titles, and their URL paths, illustrating hierarchical naming conventions. ```html Web Component Documentation Title URL Path va-link variant="action" type="primary-entry" Link - Action - Primary entry /components/link/action#primary-entry va-button big Button - Primary - Big /components/button/primary#big va-radio-button tile=true Radio Button - Tile /components/form/radio-button#tile ``` -------------------------------- ### va-sidenav Component Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/sidenav.md Demonstrates various ways to implement the va-sidenav component, including default, categorized, and nested link structures. These examples are intended for use within a web component environment. ```html

Enhancements planned, feedback welcome

This component is available for use and will continue to evolve with additional features and functionality. It is planned to replace several existing side navigation implementations across VA.gov to promote consistency and improve usability.

If you want to help us continue to improve this component, join the discussion!

## Examples ### Default {% include storybook-preview.html story="components-va-sidenav--default" link_text="va-sidenav Default" %} ### Categorized Links {% include storybook-preview.html story="components-va-sidenav--categorized-links" link_text="va-sidenav Categorized Links" %} ### Nested Links {% include storybook-preview.html story="components-va-sidenav--nested-links" link_text="va-sidenav Nested Links" %} ``` -------------------------------- ### Table Examples (HTML/Liquid) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/table.md This snippet demonstrates various examples of the VA Table component using HTML and Liquid templating. It includes default, custom markup, missing data, pagination, and sortable table variations. These examples are intended for previewing the component's appearance and functionality. ```html {% include storybook-preview.html height="350px" story="uswds-va-table--default" link_text="va-table v3 default" %} {% include storybook-preview.html height="650px" story="uswds-va-table--with-custom-markup" link_text="va-table with custom markup" %} {% include storybook-preview.html height="225px" story="uswds-va-table--with-missing-data" link_text="va-table with missing data" %} {% include storybook-preview.html height="410px" story="uswds-va-table--with-pagination" link_text="va-table with pagination" %} {% include storybook-preview.html height="410px" story="uswds-va-table--sortable" link_text="Sortable va-table" %} ``` -------------------------------- ### Component Example - Footer Image Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/footer/index.md Renders an example image of the Footer component with associated alt text and caption. This is used to visually demonstrate the component's appearance at different viewport widths. ```html {% include component-example.html alt="The VA.gov header at mobile viewport width." file="/images/components/footer/footer-mobile.png" caption="At mobile viewport width for unauthenticated users the VA.gov footer collapses the navigation into accordions." class="x2" %} ``` ```html {% include component-example.html alt="The VA.gov footer at desktop viewport width." file="/images/components/footer/footer-desktop.png" caption="At desktop viewport width for unauthenticated users the VA.gov footer exposes navigation sections and language assistance." %} ``` -------------------------------- ### Web Button Examples - Default and Variations Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/button/index.md Demonstrates various styles of web buttons, including primary, secondary, big, continue, back, and loading states. These examples showcase the default appearance and common variations used in web applications. ```html {% include storybook-preview.html height="60px" story="uswds-va-button--primary" link_text="va-button--primary" %} {% include storybook-preview.html height="60px" story="uswds-va-button--secondary" link_text="va-button--secondary" %} {% include storybook-preview.html height="80px" story="uswds-va-button--big" link_text="va-button--big" %} {% include storybook-preview.html height="60px" story="uswds-va-button--continue" link_text="va-button--continue" %} {% include storybook-preview.html height="60px" story="uswds-va-button--back" link_text="va-button--back" %} {% include storybook-preview.html height="60px" story="uswds-va-button--loading" link_text="va-button--loading" %} ``` -------------------------------- ### Include Component Example - Jekyll/Liquid Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_patterns/ask-users-for/feedback.md This snippet demonstrates how to include a component example within a Jekyll/Liquid template. It's used to display images and captions for UI components, specifying the file path, alternative text, and caption for accessibility and context. ```html {% include component-example.html alt="About VA health benefits page screenshot with call-outs." file="/images/patterns/ask-users-for/feedback/feedback-anatomy.png" caption="Page anatomy showing the placement for the feedback button." width="50%" %} ``` -------------------------------- ### Web Link Examples - Vets Design System Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/link/index.md Demonstrates various web link types including Default, Back, Active, Calendar, Channel, Download, External, and Video. These examples showcase the visual appearance and potential use cases for each link variant within a web interface. ```html ``` -------------------------------- ### Combo Box Component Examples (HTML) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/form/combo-box.md Demonstrates various states and configurations of the va-combo-box web component, including default, with default value, with error, required, with placeholder text, with hint text, and with ARIA described by message. These examples are intended for preview within a Storybook environment. ```html ``` -------------------------------- ### HTML Text Align Utility Example Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/text-align.md Demonstrates the usage of text alignment utility classes in HTML, including responsive prefixes. This example shows how to align text to the left by default and center on larger breakpoints. ```html
``` -------------------------------- ### Default Tabs Example - Web Components Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/tabs.md Demonstrates the default appearance and functionality of the va-tabs component. This example is intended for web implementation. ```html Tab 1 Tab 2 Tab 3 Content for Tab 1 Content for Tab 2 Content for Tab 3 ``` -------------------------------- ### Install ImageMagick and Ghostscript on Ubuntu/Debian Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/scripts/metrics/MONTHLY-REPORTS.md Installs ImageMagick and Ghostscript on Ubuntu or Debian-based systems using apt-get. Requires sudo privileges. ```bash sudo apt-get install imagemagick ghostscript ``` -------------------------------- ### Language Toggle Component Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/language-toggle.md Demonstrates the default and two-language variations of the language toggle component. These examples utilize a storybook-preview include to render the component with different configurations. ```html {% include storybook-preview.html story="components-va-language-toggle--default" link_text="Language toggle" %} {% include storybook-preview.html story="components-va-language-toggle--two-languages" link_text="Language toggle" %} ``` -------------------------------- ### HTML Example: Like This vs. Not This Content Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_content-style-guide/content-principles/index.md This snippet demonstrates how to use HTML markdown within a Liquid capture to showcase examples of 'like this' and 'not this' content for improving clarity and conciseness. It's used with a Jekyll include to display the comparison. ```html
If you limit consent, it may take us longer to get your records. Your doctor will follow the limits you specify.
``` ```html
The attending physician will abide by the limitation the Veteran specifies. If the Veteran opts to limit consent, please note it may take longer for VA to receive the Veteran’s records.
``` ```html
Accept the terms of use to sign in.
``` ```html
Unless you accept the terms of use, you will not be able to sign in.
``` -------------------------------- ### Mobile App Link Examples - Vets Design System Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/link/index.md Provides examples of mobile app link types, including Default, Attachment, Calendar, Directions, External, Phone, Phone TTY, and Text (SMS). These examples illustrate how links are rendered and function within a mobile application context. ```html ``` -------------------------------- ### Card Component Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/card.md This snippet demonstrates various configurations of the Card component, including default, with background, with drop shadow, and with an icon. These examples showcase the component's flexibility in presenting different types of information. ```html Default card content Card with background Card with drop shadow Card with icon ``` -------------------------------- ### Process Monthly Analytics Report - Example Usage Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/scripts/metrics/MONTHLY-REPORTS.md Examples demonstrating how to run the monthly report processing commands with specific file paths and dates for June and July 2025. ```bash # Process June 2025 report ./scripts/add-monthly-report.sh ~/Downloads/VA_Design_System_Top_25_June_2025.pdf 2025-06 # Process July 2025 report npm run process-monthly-report ~/Downloads/VA_Design_System_Top_25_July_2025.pdf 2025-07 ``` -------------------------------- ### Flexbox Utilities: Flex Property Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/flexbox.md Demonstrates the usage of the 'flex' shorthand property in HTML, which encompasses flex-grow, flex-shrink, and flex-basis. It includes guidance on responsive prefixes and different flex ratios. ```html
Flex item 1
Flex item 2 (auto width)
Flex item 3
``` -------------------------------- ### Button - Icon Examples using Storybook Preview Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/button/button-icon.md Demonstrates the usage of the Button - Icon component with different actions like 'Change file', 'Delete', and 'Cancel'. These examples are rendered using Storybook's preview mechanism, specifying the story, link text, and desired height for display. ```html {% include storybook-preview.html story="components-va-button-icon--change-file" link_text="Change file, used in the File input component" height="75px" %} ``` ```html {% include storybook-preview.html story="components-va-button-icon--delete" link_text="Delete, used in the File input component" height="75px" %} ``` ```html {% include storybook-preview.html story="components-va-button-icon--cancel" link_text="va-button-icon cancel variation" height="75px" %} ``` -------------------------------- ### CSS for Grid Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/layout/html/grid.html Provides CSS styles for visually representing grid layouts and their contained elements. This includes basic styling for the grid container and its child elements, adding borders and padding for clarity. ```CSS .grid-example>div { margin: 2em 0; } .grid-example>div>div { border: 1px solid #ccc; padding: .75em; } ``` -------------------------------- ### Border Color Utility Examples - HTML Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/border.md Shows examples of applying border color utilities using predefined color tokens from primary, grayscale, tertiary, and hub palettes. Similar to border style, it requires the border shorthand if no border is present. ```html

Base colors

{% for item in site.data.colors.primary %} {% include border-color-example.html name=item.name token=item.token %} {% endfor %}

Grayscale

{% for item in site.data.colors.grayscale %} {% include border-color-example.html name=item.name token=item.token %} {% endfor %}

Tertiary colors

{% for item in site.data.colors.tertiary %} {% include border-color-example.html name=item.name token=item.token %} {% endfor %}

Hub colors

{% for item in site.data.colors.hub %} {% include border-color-example.html name=item.name token=item.token %} {% endfor %}
``` -------------------------------- ### Header Component Example - HTML Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/header/index.md These examples illustrate the visual appearance of the VA.gov header at different viewport widths (mobile and desktop). They are used within documentation to showcase the component's design and layout for authenticated and unauthenticated users. ```html {% include component-example.html alt="The VA.gov header at mobile viewport width." file="/images/components/header/header-mobile.png" caption="At mobile viewport width for unauthenticated users the VA.gov header shows a sign in link and a menu button." class="x2" reverse="true" %} ``` ```html {% include component-example.html alt="The VA.gov header at desktop viewport width." file="/images/components/header/header-desktop.png" caption="At desktop viewport width for unauthenticated users the VA.gov header exposes search, contact us, and main menu navigation." reverse="true" %} ``` -------------------------------- ### Define Custom Elements for Web Components Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/install.md Imports and calls the necessary functions to define and register the custom elements for the Web Component library. `applyPolyfills` is optional for older browser support (e.g., IE11). ```javascript import { applyPolyfills, // Only necessary if you wish to support older browsers such as IE11 defineCustomElements, } from "@department-of-veterans-affairs/component-library"; applyPolyfills().then(() => { defineCustomElements(); }); ``` -------------------------------- ### Stencil Unit Test Example Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/contributing.md Illustrates how to write unit tests for Stencil web components. This example uses Jest to test specific functionalities or properties of a component, such as the va-telephone component. ```typescript import { h } from '@stencil/core'; import { render } from '@testing-library/react'; describe('va-telephone', () => { it('renders with default values', () => { const page = render(); // Add assertions here }); }); ``` -------------------------------- ### Flexbox Utilities: Align Items Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/flexbox.md Demonstrates the 'align-items' property for controlling the alignment of flex items along the cross-axis of a flex container. It includes examples for stretch, flex-start, flex-end, center, and baseline alignments. ```html
Centered Item 1
Centered Item 2
``` -------------------------------- ### Display Rake Help Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/RAKE_TASKS.md Shows all available Rake tasks within the project and provides usage examples for each task. This is useful for understanding the available automation capabilities. ```bash rake help ``` -------------------------------- ### Display Text Color Examples - Liquid Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/text-color.md This snippet demonstrates how to display text color examples using Liquid templating language. It iterates through different color data sets (primary, grayscale, tertiary, hub) and includes a 'color-example' partial to render each color swatch with its name and token. This is useful for showcasing available color options within the Vets Design System. ```html
{% include _showcase-header.html heading_level=3 header="Color" responsive=false css_property="color" %}

Base colors

{% for item in site.data.colors.primary %} {% include color-example.html name=item.name token=item.token %} {% endfor %}

Grayscale

{% for item in site.data.colors.grayscale %} {% include color-example.html name=item.name token=item.token %} {% endfor %}

Tertiary colors

{% for item in site.data.colors.tertiary %} {% include color-example.html name=item.name token=item.token %} {% endfor %}

Hub colors

{% for item in site.data.colors.hub %} {% include color-example.html name=item.name token=item.token %} {% endfor %}
``` -------------------------------- ### Flexbox Utilities: Flex Wrap Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/flexbox.md Shows how to control whether flex items wrap onto a new line when they exceed the container's width. This example demonstrates the 'flex-wrap' property and its responsive variations. ```html
Item 1
Item 2
Item 3
Item 4
``` -------------------------------- ### Form Example with Description - HTML Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_patterns/ask-users-for/a-single-response.md An example of a form element that includes a descriptive section. This is useful for providing context or additional instructions to the user about the form or a specific field. It typically involves an HTML structure that wraps the descriptive text and the form input. ```html

This is a description for the form or a specific field. It helps users understand what information is needed and why.

``` -------------------------------- ### VA Process List Component - Custom Sizing Example Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/process-list.md This code demonstrates the VA Process List component with custom sizing applied to its elements. It's intended for Storybook previews and has no external JavaScript dependencies. ```html ``` -------------------------------- ### Embed Storybook Example (Jekyll Include) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/contributing/contributing-to-docs.md This Jekyll include allows embedding Storybook examples for VADS components and variations. It requires specifying the story path and link text. For mobile components, additional parameters like height and an is_mobile flag can be used. ```markdown {% raw %}{% include storybook-preview.html story="[components|uswds]-VA-COMPONENT-NAME--VARIATION" link_text=page.web-component %}{% endraw %} ``` ```markdown {% raw %}{% include storybook-preview.html height="100px" story="VA-COMPONENT-NAME--VARIATION" link_text="va-mobile__VA-COMPONENT-NAME--VARIATION" is_mobile=true %}{% endraw %} ``` -------------------------------- ### Border Shorthand Utility Examples - HTML Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/utilities/border.md Demonstrates the use of the border shorthand utility for applying borders to all sides, top, right, bottom, and left. It iterates through predefined width values from site data. ```html

Border on all sides

{% for item in site.data.borders.widths %} {% include border-example.html class="border" value=item.width %} {% endfor %}

Border top

{% for item in site.data.borders.widths %} {% include border-example.html class="border-top" value=item.width %} {% endfor %}

Border right

{% for item in site.data.borders.widths %} {% include border-example.html class="border-right" value=item.width %} {% endfor %}

Border bottom

{% for item in site.data.borders.widths %} {% include border-example.html class="border-bottom" value=item.width %} {% endfor %}

Border left

{% for item in site.data.borders.widths %} {% include border-example.html class="border-left" value=item.width %} {% endfor %}
``` -------------------------------- ### Web Radio Button Component Examples Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/form/radio-button.md Demonstrates various implementations of the `va-radio` web component, including default, tile, hint text, label header, on background, forms patterns, and error states. These examples showcase different ways to use the radio button for user selection in web applications. ```html ``` -------------------------------- ### BEM Syntax - Combined Example Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/naming/css.md Presents a complete HTML structure utilizing BEM syntax, showing a block ('alert') with a modifier ('alert--success') and nested elements ('alert__header', 'alert__body'). This example showcases the practical application of BEM for semantic and scoped styling. ```html

This is the alert heading

This is some alert text

``` -------------------------------- ### Example of an ineffective complex term definition (Jekyll/Liquid) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_content-style-guide/plain-language/define-complex-terms.md This snippet illustrates a less effective way to define a complex term, where the definition is omitted or poorly integrated. It serves as a negative example to contrast with best practices, highlighting how clarity can be lost. This is also presented using Liquid templating. ```liquid {% capture example_not_this_4 %} Your premium depends on these factors: {% endcapture %} ``` -------------------------------- ### Breadcrumb Router Link Support Example Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/breadcrumbs.md This snippet demonstrates how to integrate React Router with breadcrumbs for dynamic navigation. It requires the React Router library and assumes a basic setup for routing. ```jsx import React from 'react'; import { Breadcrumbs, BreadcrumbItem } from '@uswds/react'; import { Link } from 'react-router-dom'; function MyBreadcrumbs() { return ( Home Section Current Page ); } export default MyBreadcrumbs; ``` -------------------------------- ### Back to top Component Usage (Web) Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_components/back-to-top.md This snippet demonstrates the usage of the va-back-to-top web component. It includes an example of how to implement the component in HTML, typically within a web page structure. ```html ``` -------------------------------- ### HTML Example: Q&A Pronoun Usage Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_content-style-guide/plain-language/use-pronouns.md Shows correct pronoun usage in a Question and Answer format, where the Veteran uses 'I' and 'Am I', and the VA uses 'You' and 'we'. This example highlights direct address and avoids generic references. ```html Am I eligible for Veterans Pension benefits? You may be eligible if you meet these requirements. ``` ```html Are Veterans eligible for pension benefits? Veterans who meet these requirements may be eligible. ``` -------------------------------- ### Use Sass Mixin for Multiple Breakpoints Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_foundation/breakpoints.md Provides an example of using the Sass `@media` mixin within a component's selector to apply different styles at various breakpoints. It emphasizes starting with smaller breakpoints and scaling up. ```scss .some-component { margin: units(1); @include media($medium-screen) { margin: units(2); } @include media($desktop-lg) { margin: units(3); } } ``` -------------------------------- ### Use CSS-Library Design Tokens Source: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/blob/main/src/_about/developers/install.md Applies a CSS variable from the CSS-Library's design tokens to set the background color of an element. This demonstrates how to leverage the CSS custom properties format for styling. ```html ``` ```css .your-class { background-color: var(--vads-color-base); } ```