Search component #677
-
We are planning to add a Widget search feature in Studio. It's similar to Chrome search feature. Could you recommend which Paste component I need to use for this feature? Basic interaction will be
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
Thanks, @sang-yeo ! Could you share a screenshot, paper sketch, or link of what you're trying to achieve? Off the top of my head, a constraint to consider is that you won't be able to turn the Button component (the search icon) into an Input on click. But what you can do is have a very short Input that expands on focus (like the search in console nav) OR open a modal or other dialog that has an input. Input is likely the right component to use here. But if you need typeahead/autocomplete (like the search in console nav or on the Paste doc site), you'll want to use Combobox—we don't have a Sketch symbol for it yet, but you can use the Select symbol for now and pair it with the Menu symbol. Search is generally the only place where we'd say not including a label is ok, but it really depends on a few things:
|
Beta Was this translation helpful? Give feedback.
-
One thing that will affect which input control you use will be the search behavior itself. Can you describe what happens when I type in the search input @sang-yeo? |
Beta Was this translation helpful? Give feedback.
Thanks, @sang-yeo ! Could you share a screenshot, paper sketch, or link of what you're trying to achieve?
Off the top of my head, a constraint to consider is that you won't be able to turn the Button component (the search icon) into an Input on click. But what you can do is have a very short Input that expands on focus (like the search in console nav) OR open a modal or other dialog that has an input.
Input is likely the right component to use here. But if you need typeahead/autocomplete (like the search in console nav or on the Paste doc site), you'll want to use Combobox—we don't have a Sketch symbol for it yet, but you can use the Select symbol for now and pair it with the Menu symbol.
S…