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

# Change Text

> These sub-variables is used to change the text context of webflow elements if the user is logged in.

## How to use

```html theme={null}
looop_on-login=change-text
```

```html theme={null}
change-text="REPLACE_WITH_SUB_VARIABLE_OR_PLAIN_TEXT"
```

## Avilable Sub-Variables

### Email

This will replace the text with the logged in user's email.

```html theme={null}
change-text="email"
```

### First Name

This will replace the text with the logged in user's first name.

```html theme={null}
change-text="firstname"
```

### Last Name

This will replace the text with the logged in user's last name.

```html theme={null}
change-text="lastname"
```

### Full Name

This will replace the text with the logged in user's full name.

```html theme={null}
change-text="fullname"
```

### User ID

This will replace the text with the logged in user's user id.

```html theme={null}
change-text="id"
```

### Phone

This will replace the text with the logged in user's phone number.

```html theme={null}
change-text="phone"
```

### Address

This will replace the text with the logged in user's address.

```html theme={null}
change-text="address"
```

<Note>
  If value of change-text is not from sub-variables noted ablove, Looop will replace the text with the value of change-text.
</Note>

## Example

1. Lets say we want to change the text of a button to the logged in user's first name. We can do this by adding the following attributes to the button element.

```html theme={null}
looop_on-login=change-text
```

```html theme={null}
change-text="firstname"
```

2. Now if we want to chnage teh text of same button to to say "Logged in" if the user is logged in, we can do this by adding the following attributes to the button element.

```html theme={null}
looop_on-login=change-text
```

```html theme={null}
change-text="Logged in"
```
