> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fileloom.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Transformation Helpers

> Transform text case and format with uppercase, lowercase, capitalize, titleCase, slugify, and more.

Text transformation helpers change the case and format of text strings.

## uppercase

Converts text to UPPERCASE.

```handlebars theme={null}
{{uppercase "hello world"}}
```

**Output:** `HELLO WORLD`

**Use cases:**

* Headers and titles
* Status badges
* Emphasis text

```handlebars theme={null}
<span class="badge">{{uppercase status}}</span>
<!-- Output: <span class="badge">ACTIVE</span> -->
```

## lowercase

Converts text to lowercase.

```handlebars theme={null}
{{lowercase "Hello World"}}
```

**Output:** `hello world`

**Use cases:**

* Email addresses
* URLs
* Normalizing user input

```handlebars theme={null}
<a href="mailto:{{lowercase email}}">{{email}}</a>
```

## capitalize

Capitalizes the first letter, lowercases the rest.

```handlebars theme={null}
{{capitalize "hello WORLD"}}
```

**Output:** `Hello world`

**Use cases:**

* Sentence beginnings
* Single-word labels

```handlebars theme={null}
<p>Status: {{capitalize status}}</p>
<!-- Input: "PENDING" → Output: "Pending" -->
```

## titleCase

Capitalizes the first letter of each word.

```handlebars theme={null}
{{titleCase "hello world example"}}
```

**Output:** `Hello World Example`

**Use cases:**

* Names
* Titles
* Headings

```handlebars theme={null}
<h2>{{titleCase documentTitle}}</h2>
<!-- Input: "annual report 2024" → Output: "Annual Report 2024" -->
```

## slugify

Converts text to URL-friendly slug format.

```handlebars theme={null}
{{slugify "Hello World! This is a Test"}}
```

**Output:** `hello-world-this-is-a-test`

**Use cases:**

* URL generation
* File names
* Identifiers

```handlebars theme={null}
<a href="/products/{{slugify productName}}">{{productName}}</a>
<!-- Input: "Premium Widget Pro" → href="/products/premium-widget-pro" -->
```

## camelCase

Converts text to camelCase format.

```handlebars theme={null}
{{camelCase "hello world example"}}
```

**Output:** `helloWorldExample`

**Use cases:**

* Variable names
* JSON keys
* Programming identifiers

```handlebars theme={null}
data-field="{{camelCase fieldName}}"
<!-- Input: "First Name" → data-field="firstName" -->
```

## snakeCase

Converts text to snake\_case format.

```handlebars theme={null}
{{snakeCase "Hello World Example"}}
```

**Output:** `hello_world_example`

**Use cases:**

* Database column names
* File names
* API parameters

```handlebars theme={null}
{{snakeCase "Product Name"}}
<!-- Output: product_name -->
```

## initials

Extracts the first letter of each word.

```handlebars theme={null}
{{initials "John David Smith"}}
```

**Output:** `JDS`

**Use cases:**

* Avatars
* Abbreviations
* Monograms

```handlebars theme={null}
<div class="avatar">{{initials customerName}}</div>
<!-- Input: "Alice Johnson" → Output: "AJ" -->
```

## Combining Text Helpers

```handlebars theme={null}
{{! Uppercase initials }}
{{uppercase (initials name)}}

{{! Slug from title case }}
{{slugify (titleCase rawTitle)}}

{{! Capitalize then truncate }}
{{truncate (capitalize description) 50}}
```

## Examples

### Status Badge

```handlebars theme={null}
<span class="badge badge-{{lowercase status}}">
  {{uppercase status}}
</span>
<!-- Input: status = "Active" -->
<!-- Output: <span class="badge badge-active">ACTIVE</span> -->
```

### User Avatar

```handlebars theme={null}
<div class="avatar" title="{{titleCase name}}">
  {{initials name}}
</div>
```

### URL-Safe Links

```handlebars theme={null}
<a href="/category/{{slugify category}}/{{slugify productName}}">
  {{titleCase productName}}
</a>
```
