mi6 / mi6/ic-ui-kit

Add adornment ​to text field

Open
#1,635 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: ic-text-field
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary

I implemented a upload dialogue box recently in which I use a text field for the filename, I was surprised to find out that there is no adornment and therefore had to add a label after the text box, make it flex so they're on the same line, then handle the validation state being set on the text box causing the label to anchor to the bottom.

## 💬 Description

Adornments are pretty standard in text fields, see [material UI](https://mui.com/material-ui/react-text-field/#:~:text=Input%20Adornments,reveal%20the%20password) for full details

## 💰 Use value

Reveal/hide password, additional context in fields for weight, money, file type, etc.

## 📝 Acceptance Criteria

If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

_Given_ a user has chosen to upload a file
_When_ the file is selected
_Then_ the text box is capable of displaying the file extension

## ✏ Designs

From material UI:
![image](https://github.com/mi6/ic-design-system/assets/34197856/b6e0f959-2f13-4a33-972e-0f8dbca44e2c)

## 🧾 Guidance
https://mui.com/material-ui/react-text-field/

## Additional info

Tell us anything else useful to help us understand your suggestion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the text field component and its validation and layout behavior, then review the linked Material UI adornment guidance. Confirm the intended interactions and edge cases before implementation; done should include displaying a selected file extension in the text field without disrupting validation layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.