{"id":26696745,"url":"https://github.com/easydevv/nicegui-tailwind-layout","last_synced_at":"2025-03-26T20:27:45.154Z","repository":{"id":284333600,"uuid":"954594718","full_name":"EasyDevv/nicegui-tailwind-layout","owner":"EasyDevv","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-25T10:28:16.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T11:29:27.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EasyDevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-25T10:19:33.000Z","updated_at":"2025-03-25T10:28:20.000Z","dependencies_parsed_at":"2025-03-25T11:39:51.272Z","dependency_job_id":null,"html_url":"https://github.com/EasyDevv/nicegui-tailwind-layout","commit_stats":null,"previous_names":["easydevv/nicegui-tailwind-layout"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fnicegui-tailwind-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fnicegui-tailwind-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fnicegui-tailwind-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fnicegui-tailwind-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EasyDevv","download_url":"https://codeload.github.com/EasyDevv/nicegui-tailwind-layout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245730208,"owners_count":20662971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-03-26T20:27:44.609Z","updated_at":"2025-03-26T20:27:45.149Z","avatar_url":"https://github.com/EasyDevv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# NiceGUI Tailwind Layout\n\nA project created to provide more flexible customization by building layouts using only Tailwind in NiceGUI.\n\n#### English | [한국어](README_KR.md)\n\n![nicegui-tailwind-layout](docs/templates.gif)\n\n\u003c/div\u003e\n\n## Common Settings\n\nAll templates share the following basic settings:\n\n### Color Settings\n```python\nui.colors(\n    base_100=\"oklch(100% 0 0)\",  # Brightest background color\n    base_200=\"oklch(93% 0 0)\",   # Sidebar background color\n    base_300=\"oklch(86% 0 0)\",   # Header/Footer background color\n    base_400=\"oklch(80% 0 0)\",   # Menubar background color (used in 4-column layout)\n)\n```\n\n### Layout Style Settings\nSettings for basic padding and overflow handling:\n```python\nui.query(\".nicegui-content\").style(\"padding: 0; overflow: hidden;\")\n```\n\n## Layout Templates\n\n### 2 Column A ([source](templates/2_column_a.py))\n![2 Column A](docs/2_column_a.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex w-full h-screen\"):\n        # Sidebar\n        with ui.element(\"div\").classes(\"w-[30%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Sidebar\").classes(\"text-xl\")\n        # Main\n        with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n            ui.label(\"Content\").classes(\"text-xl\")\n```\n\n### 2 Column B ([source](templates/2_column_b.py))\n![2 Column B](docs/2_column_b.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex flex-col w-full h-screen\"):\n        # Header\n        with ui.element(\"header\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n            ui.label(\"Header\").classes(\"text-xl\")\n        # Main content with sidebar\n        with ui.element(\"div\").classes(\"flex grow\"):\n            with ui.element(\"div\").classes(\"w-[30%] max-w-xs bg-base-200 p-4\"):\n                ui.label(\"Sidebar\").classes(\"text-xl\")\n            with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n                ui.label(\"Content\").classes(\"text-xl\")\n        # Footer\n        with ui.element(\"footer\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n            ui.label(\"Footer\").classes(\"text-xl\")\n```\n\n### 2 Column C ([source](templates/2_column_c.py))\n![2 Column C](docs/2_column_c.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex w-full h-screen\"):\n        # Sidebar\n        with ui.element(\"div\").classes(\"w-[30%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Sidebar\").classes(\"text-xl\")\n\n        # Main\n        with ui.element(\"div\").classes(\"flex flex-col grow h-full\"):\n            # Header\n            with ui.element(\"header\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n                ui.label(\"Header\").classes(\"text-xl\")\n\n            # Content\n            with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n                ui.label(\"Content\").classes(\"text-xl\")\n            # Footer\n            with ui.element(\"footer\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n                ui.label(\"Footer\").classes(\"text-xl\")\n```\n\n### 3 Column A ([source](templates/3_column_a.py))\n![3 Column A](docs/3_column_a.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex w-full h-screen\"):\n        # Left Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Left Sidebar\").classes(\"text-xl\")\n        # Content\n        with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n            ui.label(\"Content\").classes(\"text-xl\")\n        # Right Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Right Sidebar\").classes(\"text-xl\")\n```\n\n### 3 Column B ([source](templates/3_column_b.py))\n![3 Column B](docs/3_column_b.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex flex-col w-full h-screen\"):\n        # Header\n        with ui.element(\"header\").classes(\"bg-base-300 p-4\"):\n            ui.label(\"Header\").classes(\"text-xl\")\n\n        # Main\n        with ui.element(\"div\").classes(\"flex grow\"):\n            # Left Sidebar\n            with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n                ui.label(\"Left Sidebar\").classes(\"text-xl\")\n\n            # Content\n            with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n                ui.label(\"Content\").classes(\"text-xl\")\n\n            # Right Sidebar\n            with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n                ui.label(\"Right Sidebar\").classes(\"text-xl\")\n\n        # Footer\n        with ui.element(\"footer\").classes(\"bg-base-300 p-4\"):\n            ui.label(\"Footer\").classes(\"text-xl\")\n```\n\n### 3 Column C ([source](templates/3_column_c.py))\n![3 Column C](docs/3_column_c.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex w-full h-screen\"):\n        # Left Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Left Sidebar\").classes(\"text-xl\")\n\n        # Main\n        with ui.element(\"div\").classes(\"flex flex-col grow h-full\"):\n            # Header\n            with ui.element(\"header\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n                ui.label(\"Header\").classes(\"text-xl\")\n\n            # Content\n            with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n                ui.label(\"Content\").classes(\"text-xl\")\n\n            # Footer\n            with ui.element(\"footer\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n                ui.label(\"Footer\").classes(\"text-xl\")\n\n        # Right Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Right Sidebar\").classes(\"text-xl\")\n```\n\n### 4 Column A ([source](templates/4_column_a.py))\n![4 Column A](docs/4_column_a.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex w-full h-screen\"):\n        # MenuBar\n        with ui.element(\"div\").classes(\n            \"flex flex-col w-xs bg-base-400 p-4 items-center justify-start gap-4\"\n        ):\n            ui.button(icon=\"home\", color=\"base-100\").props(\"flat round\")\n            ui.button(icon=\"search\", color=\"base-100\").props(\"flat round\")\n        # Left Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Left Sidebar\").classes(\"text-xl\")\n        # Content\n        with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n            ui.label(\"Content\").classes(\"text-xl\")\n        # Right Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Right Sidebar\").classes(\"text-xl\")\n```\n\n### 4 Column B ([source](templates/4_column_b.py))\n![4 Column B](docs/4_column_b.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex flex-col w-full h-screen\"):\n        # Header\n        with ui.element(\"header\").classes(\"bg-base-300 p-4\"):\n            ui.label(\"Header\").classes(\"text-xl\")\n\n        # Main\n        with ui.element(\"div\").classes(\"flex grow\"):\n            # MenuBar\n            with ui.element(\"div\").classes(\n                \"flex flex-col w-xs bg-base-400 p-4 items-center justify-start gap-4\"\n            ):\n                ui.button(icon=\"home\", color=\"base-100\").props(\"flat round\")\n                ui.button(icon=\"search\", color=\"base-100\").props(\"flat round\")\n\n            # Left Sidebar\n            with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n                ui.label(\"Left Sidebar\").classes(\"text-xl\")\n\n            # Content\n            with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n                ui.label(\"Content\").classes(\"text-xl\")\n\n            # Right Sidebar\n            with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n                ui.label(\"Right Sidebar\").classes(\"text-xl\")\n\n        # Footer\n        with ui.element(\"footer\").classes(\"bg-base-300 p-4\"):\n            ui.label(\"Footer\").classes(\"text-xl\")\n```\n\n### 4 Column C ([source](templates/4_column_c.py))\n![4 Column C](docs/4_column_c.png)\n\n```python\ndef app():\n    with ui.element(\"div\").classes(\"flex w-full h-screen\"):\n        # MenuBar\n        with ui.element(\"div\").classes(\n            \"flex flex-col w-xs bg-base-400 p-4 items-center justify-start gap-4\"\n        ):\n            ui.button(icon=\"home\", color=\"base-100\").props(\"flat round\")\n            ui.button(icon=\"search\", color=\"base-100\").props(\"flat round\")\n\n        # Left Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Left Sidebar\").classes(\"text-xl\")\n\n        # Main\n        with ui.element(\"div\").classes(\"flex flex-col grow h-full\"):\n            # Header\n            with ui.element(\"header\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n                ui.label(\"Header\").classes(\"text-xl\")\n\n            # Content\n            with ui.element(\"div\").classes(\"grow bg-base-100 p-4\"):\n                ui.label(\"Content\").classes(\"text-xl\")\n\n            # Footer\n            with ui.element(\"footer\").classes(\"min-h-[4%] bg-base-300 p-4\"):\n                ui.label(\"Footer\").classes(\"text-xl\")\n\n        # Right Sidebar\n        with ui.element(\"div\").classes(\"w-[20%] max-w-xs bg-base-200 p-4\"):\n            ui.label(\"Right Sidebar\").classes(\"text-xl\")\n```\n\n## Tech Stack\n\n- Python 3.12\n- NiceGUI\n- Tailwind CSS\n- UV (Package Manager)\n\n## How to Run\n\n### 1. Install Dependencies:\n```bash\ngit clone https://github.com/easydevv/nicegui-tailwind-layout.git\ncd nicegui-tailwind-layout\n```\n\n```bash\nuv venv\nuv sync\n```\n\n### 2. Run the Application:\n```bash\npython main.py\n```\n\n## Template List\n\nYou can see the list of templates when you run the application.\n\n![Templates](docs/root.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasydevv%2Fnicegui-tailwind-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasydevv%2Fnicegui-tailwind-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasydevv%2Fnicegui-tailwind-layout/lists"}