Navigation Components
Components for navigating between different views.
pymiro.components.navigation
Navigation components for pymiro.
Sidebar
Sidebar(
items: list[str],
active: int = 0,
on_change: Callable[[int], Any] | None = None,
width: int = 200,
style: dict[str, str] | None = None,
class_name: str | None = None,
key: str | None = None,
) -> VNode
Renders a Sidebar component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
list[str]
|
Configuration for items. |
required |
active
|
int
|
Configuration for active. |
0
|
on_change
|
Callable[[int], Any] | None
|
Configuration for on_change. |
None
|
width
|
int
|
Configuration for width. |
200
|
style
|
dict[str, str] | None
|
Configuration for style. |
None
|
class_name
|
str | None
|
Configuration for class_name. |
None
|
key
|
str | None
|
Configuration for key. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
VNode |
VNode
|
The virtual DOM node representing this component. |
Example
from pymiro.components import Sidebar
Sidebar()
Source code in pymiro/components/navigation.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
Tabs
Tabs(
tabs: list[str],
active: int = 0,
on_change: Callable[[int], Any] | None = None,
style: dict[str, str] | None = None,
class_name: str | None = None,
key: str | None = None,
) -> VNode
Renders a Tabs component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tabs
|
list[str]
|
Configuration for tabs. |
required |
active
|
int
|
Configuration for active. |
0
|
on_change
|
Callable[[int], Any] | None
|
Configuration for on_change. |
None
|
style
|
dict[str, str] | None
|
Configuration for style. |
None
|
class_name
|
str | None
|
Configuration for class_name. |
None
|
key
|
str | None
|
Configuration for key. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
VNode |
VNode
|
The virtual DOM node representing this component. |
Example
from pymiro.components import Tabs
Tabs()
Source code in pymiro/components/navigation.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |