You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/clay-form/docs/input-group.mdx
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,48 @@ export default function App() {
167
167
}
168
168
```
169
169
170
+
### Inset Before
171
+
172
+
```jsx preview
173
+
import {Provider} from'@clayui/core';
174
+
importForm, {ClayInput} from'@clayui/form';
175
+
importClayButtonfrom'@clayui/button';
176
+
importClayStickerfrom'@clayui/sticker';
177
+
importReact, {useState} from'react';
178
+
179
+
import'@clayui/css/lib/css/atlas.css';
180
+
181
+
exportdefaultfunctionApp() {
182
+
return (
183
+
<Provider spritemap="/public/icons.svg">
184
+
<div className="p-4">
185
+
<Form.Group>
186
+
<label htmlFor="selectASpace">Select a Space</label>
187
+
<ClayInput.Group>
188
+
<ClayInput.GroupItem>
189
+
<ClayInput
190
+
aria-label="Select a space"
191
+
className="form-control-select"
192
+
id="selectASpace"
193
+
insetBefore
194
+
placeholder="Select a Space"
195
+
type="text"
196
+
value="Space Program"
197
+
/>
198
+
<ClayInput.GroupInsetItem before>
199
+
<ClaySticker displayType="outline-2" size="sm">
200
+
S
201
+
</ClaySticker>
202
+
</ClayInput.GroupInsetItem>
203
+
</ClayInput.GroupItem>
204
+
</ClayInput.Group>
205
+
</Form.Group>
206
+
</div>
207
+
</Provider>
208
+
);
209
+
}
210
+
```
211
+
170
212
### Stacked
171
213
172
214
For creating a stack of the items inside a item group, use `stacked` property in the `<ClayInput.Group>` and use `shrink` property for using in screens sizes less than 576px.
0 commit comments