---
title: "Text field animated icon"
description: "Text field animated icon (Forms & input). Caret blinks then advances as a line of text is entered."
canonical: https://generativeicons.com/icons/text-field/
---

# Text field animated icon

Caret blinks then advances as a line of text is entered.

- Id: `text-field`
- Category: Forms & input
- Search terms: input, text input, input field, text box, textbox, form field, entry field, type here, typing, caret
- Two states: prepared to result, played forward and back
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/text-field.lottie (dotLottie, 7065 bytes, sha256 5bacfd93abbb8c34eaa339f101d46192a7d333d65a70b93b650bb988fc4d1ea2)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add text-field
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/text-field.mjs';

export function TextFieldIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/text-field.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/text-field/ · https://generativeicons.com/api/icons/text-field
