diff --git a/packages/react-core/src/components/TextArea/examples/TextArea.md b/packages/react-core/src/components/TextArea/examples/TextArea.md
index 235dfc24d63..4f80fdb6e52 100644
--- a/packages/react-core/src/components/TextArea/examples/TextArea.md
+++ b/packages/react-core/src/components/TextArea/examples/TextArea.md
@@ -9,300 +9,52 @@ propComponents: ['TextArea']
### Basic
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-class SimpleTextArea extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ''
- };
-
- this.handleTextAreaChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
-
- return ;
- }
-}
+```ts file="./TextAreaBasic.tsx"
```
### Invalid
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-class InvalidTextArea extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ''
- };
-
- this.handleInvalidTextAreaChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
-
- return (
-
- );
- }
-}
+```ts file="./TextAreaInvalid.tsx"
```
### Validated
-```js
-import React from 'react';
-import { Form, FormGroup, TextArea } from '@patternfly/react-core';
-
-class InvalidTextArea extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: '',
- invalidText: 'You must have something to say',
- validated: 'default',
- helperText: 'Share your thoughts.'
- };
-
- this.simulateNetworkCall = callback => {
- setTimeout(callback, 2000);
- };
-
- this.handleTextAreaChange = value => {
- this.setState(
- {
- value,
- validated: 'default',
- helperText: 'Validating...'
- },
- this.simulateNetworkCall(() => {
- if (value && value.length > 0) {
- if (value.length >= 10) {
- this.setState({ validated: 'success', helperText: 'Thanks for your comments!' });
- } else {
- this.setState({
- validated: 'error',
- invalidText: 'Your being too brief, please enter at least 10 characters.'
- });
- }
- } else {
- this.setState({ validated: 'warning', helperText: 'You must have something to say' });
- }
- })
- );
- };
- }
-
- render() {
- const { value, validated, helperText, invalidText } = this.state;
-
- return (
-
- );
- }
-}
+```ts file="./TextAreaValidated.tsx"
```
-### Vertically resizable text area
-
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
+### Vertically resizable
-class VerticalResizeTextArea extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ''
- };
-
- this.handleTextAreaChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
-
- return (
-
- );
- }
-}
+```ts file="./TextAreaVerticallyResizable.tsx"
```
-### Horizontally resizable text area
-
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-class HorizontalResizeTextArea extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ''
- };
-
- this.handleTextAreaChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
+### Horizontally resizable
- return (
-
- );
- }
-}
+```ts file="./TextAreaHorizontallyResizable.tsx"
```
### Uncontrolled
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-;
+```ts file="./TextAreaUncontrolled.tsx"
```
### Disabled
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-;
+```ts file="./TextAreaDisabled.tsx"
```
### Read only
-```js
-import React from 'react';
-import { Checkbox, TextArea } from '@patternfly/react-core';
-
-const ReadOnlyTextArea = () => {
- const [isPlainChecked, setIsPlainChecked] = React.useState(false);
-
- return (
-
-
- setIsPlainChecked(checked)}
- />
-
-
-
- );
-};
+```ts file="./TextAreaReadOnly.tsx"
```
### Auto resizing
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-;
+```ts file="./TextAreaAutoResizing.tsx"
```
### Icon sprite variants
**Note:** The icons for the success, invalid, calendar, etc. variations in form control elements are applied as background images to the form element. By default, the image URLs for these icons are data URIs. However, there may be cases where data URIs are not ideal, such as in an application with a content security policy that disallows data URIs for security reasons. The `isIconSprite` variation changes the icon source to an external SVG file that serves as a sprite for all of the supported icons.
-```js
-import React from 'react';
-import { TextArea } from '@patternfly/react-core';
-
-IconSpriteTextArea = () => {
- const [success, setSuccess] = React.useState('');
- const [warning, setWarning] = React.useState('');
- const [error, setError] = React.useState('');
-
- return (
- <>
-