Skip to content

Commit 29f973c

Browse files
committed
docs(clayui.com): LPD-53483 Add examples of InlineText
1 parent fb35ff7 commit 29f973c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

packages/clay-form/docs/form.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,53 @@ export default function App() {
4141
}
4242
```
4343

44+
## Inline Text Input
45+
46+
A text input that grows along with its content.
47+
48+
```jsx preview
49+
import {Provider} from '@clayui/core';
50+
import Form, {ClayInput} from '@clayui/form';
51+
import React, {useState} from 'react';
52+
53+
import '@clayui/css/lib/css/atlas.css';
54+
55+
export default function App() {
56+
return (
57+
<Provider spritemap="/public/icons.svg">
58+
<div className="p-4">
59+
<Form>
60+
<Form.Group>
61+
<label htmlFor="inlineTextInput1">
62+
Inline Text Input with Label
63+
</label>
64+
<ClayInput.InlineText
65+
id="inlineTextInput1"
66+
placeholder="Placeholder"
67+
/>
68+
</Form.Group>
69+
<Form.Group>
70+
<label htmlFor="inlineTextInput1">Readonly</label>
71+
<ClayInput.InlineText
72+
id="inlineTextInput2"
73+
placeholder="Placeholder"
74+
readonly={true}
75+
value="This is readonly text in the input."
76+
/>
77+
</Form.Group>
78+
<Form.Group>
79+
<ClayInput.InlineText
80+
id="inlineTextInput3"
81+
placeholder="Untitled Case Study"
82+
/>
83+
</Form.Group>
84+
</Form>
85+
</div>
86+
</Provider>
87+
);
88+
}
89+
```
90+
4491
## Validation
4592

4693
`.has-error`, `.has-success` and `.has-warning` classes are used in `ClayForm.Group` to identifier validation state of the form group items.

0 commit comments

Comments
 (0)