Skip to content

Input with icon #409

Closed Answered by Diegiwg
AL-THE-BOT-FATHER asked this question in Q&A
Feb 20, 2023 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

I didn't know how to use the Slots, an interesting knowledge, since Quasar has several Slots.

Well, thanks to @falkoschindler, now the icon repeating problem doesn't happen anymore.

Here is an example working perfectly:

from nicegui import ui

with ui.card().classes("m-auto").style("width: 500px"):
    with ui.row().classes('items-center'):
        search_field = ui.input(label="Search")
            
        with search_field.add_slot("append"):
            icon = ui.icon('search')
ui.run()

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@falkoschindler
Comment options

Comment options

You must be logged in to vote
1 reply
@AL-THE-BOT-FATHER
Comment options

Answer selected by AL-THE-BOT-FATHER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants