# Overview

Source: https://help.codestencil.com/expanders/overview

**Expanders** are a very important piece in the architecture of CodeStencil. They form a repository of labels and the strings defined to replace those labels during code generation.

You can define as many labels as you want to use for string replacement.

![image.png](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/1790120591_6ab3128f20603.png)

Expanders consist mainly of:

- Expansion Label - This is the label you insert in your stencil
- Expansion String - Replacement string

Using Expanders

Here is a quick example of using Expanders:

![image.png](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/1774368439_69c2b6b747d32.png)

In this screenshot:

1. This is the string which contains the Expander Label - \[%NAMESPACE%\]
2. We can see what the Expander Label will expand (or translate) to - The Expansion String. This has been defined as \[%ORGANIZATION\_LABEL%\].\[%PROJECT\_NAME%\]. You can specify Expanders within Expansion Strings.
3. Here we see what \[%ORGANIZATION\_LABEL%\] will expand to: “MyOrganization”.
4. Here we see what \[%PROJECT\_NAME%\] will expand to - “*ASPNETCRUDApplication*”.

So the final output of the line will be:

(a) We want to expand a label called "NameSpace". This will expand into "MyOrganization.*ASPNETCRUDApplication*".

![image.png](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/1790124994_6ab323c24090b.png)

(b) Drag a label from the Expanders Grid and drop it into the Code Editor. Note that the Expansion Label is automatically enclosed with "\[%%\].

(c) Generate the code to see the string replacement in the generated file, just like the image above.
