{"id":44871186,"url":"https://github.com/golembebrov/nevu-ui","last_synced_at":"2026-02-17T13:01:06.952Z","repository":{"id":309082777,"uuid":"1034997158","full_name":"GolemBebrov/nevu-ui","owner":"GolemBebrov","description":"Nextgen Electric high Voltage Unusual Pygame Interface","archived":false,"fork":false,"pushed_at":"2026-02-16T11:10:09.000Z","size":16742,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T19:47:31.453Z","etag":null,"topics":["2d-graphics","cython","declarative-programming","declarative-ui","gamedev","gui","performance","pygame","pygame-ce","python","python-3","python3","ui-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GolemBebrov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-09T12:41:28.000Z","updated_at":"2026-02-16T11:10:15.000Z","dependencies_parsed_at":"2025-08-09T19:13:46.642Z","dependency_job_id":"c1bca8f9-57f0-4788-bd33-1646e333fbb4","html_url":"https://github.com/GolemBebrov/nevu-ui","commit_stats":null,"previous_names":["golembebrov/nevu-ui"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/GolemBebrov/nevu-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolemBebrov%2Fnevu-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolemBebrov%2Fnevu-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolemBebrov%2Fnevu-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolemBebrov%2Fnevu-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GolemBebrov","download_url":"https://codeload.github.com/GolemBebrov/nevu-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolemBebrov%2Fnevu-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29545294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T13:00:00.370Z","status":"ssl_error","status_checked_at":"2026-02-17T12:57:14.072Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-graphics","cython","declarative-programming","declarative-ui","gamedev","gui","performance","pygame","pygame-ce","python","python-3","python3","ui-framework"],"created_at":"2026-02-17T13:00:53.652Z","updated_at":"2026-02-17T13:01:06.945Z","avatar_url":"https://github.com/GolemBebrov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Example1](assets/title.png)\n\n![alt text](https://img.shields.io/badge/License:-MIT-orange.svg)\n\n\n\n# Brief Description\n**Nevu UI** is a library for the declarative creation of user interfaces in Pygame. The project aims to provide developers with a set of ready-made, stylable, and extensible components for the rapid creation of modern and responsive interfaces in games and multimedia applications.\n\n#### The main goal of Nevu UI: to make creating interfaces in python even easier and faster\n\n### Key features include:\n*   **Layout system:** Convenient arrangement of elements, for example, using grids (Grid) and scrollable containers (ScrollableColumn).\n*   **Set of widgets:** Ready-to-use elements such as buttons, input fields, and labels.\n*   **Flexible styling:** The ability to customize the appearance through a style system that supports colors, gradients, and borders.\n*   **Animations:** Built-in support for animations to create dynamic and lively interfaces.\n*   **Declarativeness:** Support for declarative interface creation\n\n## Style\n\n### Style - storage of parameters for customizing the appearance\nEditable parameters:\n\n* **Gradient**\n* **ColorTheme** - Analogous to MaterialDesign, there is a ready-made set of themes - `ColorThemeLibrary`\n* **Font name/size**\n* **Border Width/Radius**\n* **Text Align X/Y**\n* **Transparency**\n\n## Main Features\n\n### Nevu UI allows you to describe an interface with a clear structure\n\nExamples of declarativeness:\n\n*   **Declarative approach:** Describe your interface just as you see it.\n    ```python\n    # Specify content directly when creating the layout\n    grid = ui.Grid(content={(1,1): ui.Button(...)})\n    ```\n*   **Adaptive size system (`SizeRules`):** Forget about pixels. Use relative values that adjust to the size of the window or parent element.\n    *   `vh` / `vw`: Percentage of the window's height/width.\n    *   `fillx` / `filly` / `fill`: Percentage of the parent layout's height/width/size.\n    *   `gc` / `gcw` / `gch`: Percentage of the grid cell size.\n    *   Prefix `c`: can be placed in any SizeRule, it means that the current value will be taken (without the prefix, the original will be taken).\n*   **Powerful style system:** Customize every aspect of the appearance using the universal `Style` object.\n    *   **Themes:** Ready-made color themes in `ColorThemeLibrary`.\n    *   **Gradients:** Support for linear and radial.\n    *   **Inheritance:** Styles can be created based on existing ones.\n    *   **And much more:** Fonts, borders, rounding, transparency.\n*   **Built-in animations:** Bring your interface to life with ready-made animations for movement, transparency, etc.\n    * There are **2** types of animations:\n        *   **Start** - Allows you to set the initial appearance of the widget.\n        *   **Infinite** - Produces an infinite animation defined in `animation_manager`.\n    * Usage example:\n       * ```widget.animation_manager.add_start_animation(ui.animations.EaseOut(...))```\n\nConstant System (Constant Engine):\n\n*   `ConstantEngine` is a convenient tool built into all layouts and widgets, it allows you to:\n    * Declaratively add variables to the object's `__init__`\n    * Check the variable type during initialization and after\n    * The variable will not be visible in hints for `__init__` if it was not added to the class `TypedDict`\n    * The variable will not be visible **IN ALL** hints if you do not specify the name and type at the beginning of the class\n*   **Examples:**\n    ```python\n    import nevu_ui as ui\n    from typing import Unpack, NotRequired\n\n    #Create a TypedDict with variables (optional)\n    class MyWidgetKwargs(ui.WidgetKwargs):\n        my_var: NotRequired[int | float]\n\n    class MyWidget(ui.Widget):\n        #Create a typehint for the variable (optional but recommended)\n        my_var: int | float\n        def __init__(self, size: NvVector2 | list, style: Style = default_style, **constant_kwargs: Unpack[MyWidgetKwargs]):\n            super().__init__(size, style, **constant_kwargs)\n\n        #Override the function to add constants (mandatory)\n        def _add_constants(self):\n            super()._add_constants()\n\n          #Add a constant (mandatory)\n            self._add_constant('my_var', int | float)\n\n            #You can also add a link to a constant\n            #self._add_constant_link('my_var', 'my_var_new_name')\n\n            #You can also block a constant if necessary\n            #self._block_constant('my_var')\n    ```\n\n# Installation\n  ## Dependencies:\n  **```Python \u003e= 3.12.*```**\n  * For Building:\n    * ```setuptools \u003e= 61.0```\n    * ```Cython```\n    * ```numpy```\n  * For Running:\n    * ```pygame-ce\u003e=2.3.0```\n    * ```numpy```\n    * ```Pillow```\n    * ```moderngl```\n ## Installation via pip\n ```python\n pip install nevu-ui\n ```\n\n# Examples\n![Example1](assets/test_grid.png)\n---\n![Example2](assets/test_main.png)\n\n![Example3](assets/showcase.gif)\n\n---\n### Basic Grid\n#### Declarative Approach\n```python\nimport nevu_ui as ui #Import Nevu UI\nimport pygame\n\npygame.init()\n\nclass MyGame(ui.Manager): #Create the base of our application\n    def __init__(self):\n        window = ui.Window((400, 300), title = \"My Game\") #Create a window\n        super().__init__(window) #initialize the manager\n        self.menu = ui.Menu(self.window, [100*ui.vw, 100*ui.vh], #Create a menu\n                            layout= ui.Grid([100*ui.vw, 100*ui.vh], row=3, column=3, #Create a grid layout\n                                            content = {\n                                                (2, 2): ui.Button(lambda: print(\"You clicked!\"), \"Button\", [50*ui.fill,33*ui.fill]) #Create a button\n                                            }))\n    def on_draw(self):\n        self.menu.draw() #draw the menu\n    def on_update(self, events):\n        self.menu.update() #update the menu\n\ngame = MyGame()\ngame.run() #Run the finished application\n```\n#### Imperative Approach\n```python\nimport nevu_ui as ui #Import Nevu UI\nimport pygame\n\npygame.init()\n\nwindow = ui.Window((400, 300), title = \"My Game\") #Create a window\n\nmenu = ui.Menu(window, [100*ui.vw, 100*ui.vh]) #Create a menu\n\nlayout = ui.Grid([100*ui.vw, 100*ui.vh], row=3, column=3) #Create a grid layout\nlayout.add_item(ui.Button(lambda: print(\"You clicked!\"), \"Button\", [50*ui.fill,33*ui.fill]), x = 2, y = 2) #Create a button\n\nmenu.layout = layout #Set the menu layout\n\nwhile True: #Main loop\n    events = pygame.event.get() #Get events\n    window.update(events) #Update the window\n    menu.update() #Update the menu\n    menu.draw() #Draw the menu\n    pygame.display.update() #Update the screen\n\n```\n\n\n### Example Result\n![Example1](assets/result.png)\n---\n# Nevu UI Status at the Moment\n\n### **Layouts (Layout_Type)**\n\n(✅ - done, ❌ - not done, 💾 - deprecated)\n\n*   ✅ `Grid`\n*   ✅ `Row`\n*   ✅ `Column`\n*   ✅ `ScrollableRow`\n*   ✅ `ScrollableColumn`\n*   💾 `IntPickerGrid`\n*   ✅ `Pages`\n*   💾 `Gallery_Pages`\n*   ✅ `StackColumn`\n*   ✅ `StackRow`\n*   ✅ `CheckBoxGroup`\n\n### **Widgets (Widget)**\n\n*   ✅ `Widget`\n*   ✅ `Button`\n*   ✅ `Label`\n*   ✅ `Input`\n*   ✅ `EmptyWidget`\n*   ❌ `Tooltip` (In 0.6.X)\n*   💾 `Image`\n*   💾 `Gif`\n*   ❌ `MusicPlayer` (Will be reworked)\n*   ✅ `ProgressBar`\n*   ✅ `SliderBar`\n*   ✅ `ElementSwitcher`\n*   💾 `FileDialog`\n*   ✅ `RectCheckBox`\n\n# License\n\n**Nevu UI is protected by the MIT license**\n\n# Additional Information\n\n* **Gmail:** bebrovgolem@gmail.com\n* **Creator:** Nikita A.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolembebrov%2Fnevu-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolembebrov%2Fnevu-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolembebrov%2Fnevu-ui/lists"}