> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.knapsack.cloud/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.knapsack.cloud/_mcp/server.

# Patterns

## Adding a new Pattern

Creating a new pattern in your Knapsack workspace is straightforward. This section walks you through the simple steps required to add a new pattern:

1. Navigate to the primary or a secondary navigation menu.
2. Click on the "Add New" button and choose "Pattern".
3. Enter the title for your new pattern and configure any initial settings.
4. Click "Add Pattern" to add the new page to your documentation.

![Screenshot 2024-08-05 at 1.43.34 PM.png](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/knapsack-docs.docs.buildwithfern.com/1fe30387b348115a1e0c25d129721fa999b05d0460fbf78add0a94cef3448726/docs/assets/images/b7a8d37c-screenshot-2024-08-05-at-14334-pm-m7h24fmzxopng.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260724%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260724T210842Z&X-Amz-Expires=604800&X-Amz-Signature=c14640ddef9e58574ecf9a56e2100a27ad62f26eb58050f385d8ad09cf282036&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

***

## Connecting Code Sources

#### Connect to New Pattern

Navigate to the ***Patterns*** section through the main app bar and click the ***New Pattern*** button in the top right to open the Add New Pattern modal.

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/knapsack-docs.docs.buildwithfern.com/b11c132b00b85504cb5408504a0157789f7e4c7281d6787931ddad1e662393c5/docs/assets/images/f23054d0-new-pattern-wr7xzzvqcvpng.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260724%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260724T210842Z&X-Amz-Expires=604800&X-Amz-Signature=2a7c88251d7ba594707865ae8852896f2632c11dc88c128c71486daf4de9b4b9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

1. Give your pattern a title (must be unique)
2. Choose the documentation location. By default, we'll attempt to put the documentation under an existing group/page titled Components or Patterns.
3. Expand the ***Connect Template*** section to choose a template from packages you've already connected. If the template you want to connect is not available, you can add it later through the Template Panel.
4. Click ***Add Pattern***

#### Connect to Existing Pattern

Navigate to the ***Patterns*** section through the main app bar and find the pattern you want to add a template to.

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/knapsack-docs.docs.buildwithfern.com/d1c1c4c668a53912883434f65cd9cd9267ff4534156438991f6ba83865639fba/docs/assets/images/960b816d-item-wvprbeeczipng.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260724%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260724T210842Z&X-Amz-Expires=604800&X-Amz-Signature=5e003ab112895b65d6f2531349432505f5217bd7ea1a8e97a1a02255e34f47a5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)