|
@@ -43,3 +43,12 @@ def more() -> None:
|
|
ui.label('Go to other page')
|
|
ui.label('Go to other page')
|
|
ui.link('... with path', '/some_other_page')
|
|
ui.link('... with path', '/some_other_page')
|
|
ui.link('... with function reference', my_page)
|
|
ui.link('... with function reference', my_page)
|
|
|
|
+
|
|
|
|
+ @text_demo('Link from images and other elements', '''
|
|
|
|
+ By nesting elements inside a link you can make the whole element clickable.
|
|
|
|
+ This works with all elements but is most useful for non-interactive elements like
|
|
|
|
+ [ui.image](/documentation/image), [ui.avatar](/documentation/image) etc.
|
|
|
|
+ ''')
|
|
|
|
+ def link_from_elements():
|
|
|
|
+ with ui.link(target='https://github.com/zauberzeug/nicegui'):
|
|
|
|
+ ui.image('https://picsum.photos/id/41/640/360').classes('w-64')
|