diff --git a/snippets/input-with-prefix.md b/snippets/input-with-prefix.md index 48e16f974..f382d3608 100644 --- a/snippets/input-with-prefix.md +++ b/snippets/input-with-prefix.md @@ -1,18 +1,18 @@ --- -title: Input with Prefix -tags: visual,interactivity,intermediate +title: Input with prefix +tags: interactivity,visual,intermediate --- Creates an input with a visual, non-editable prefix. -- Create a parent element, containing the prefix and the input -- Remove border and outline from the input, and apply it to the parent element, to give it the appearance of an input box -- Use `:focus-within` selector to change the parent element style accordingly +- Use `display: flex` to create a container element. +- Remove the border and outline from the `input` field and apply them to the parent element instead to make it look like an input box. +- Use the `:focus-within` selector to style the parent element accordingly, when the user interacts with the `input` field. ```html