# EidosUI 🎨
A modern, flexible Tailwind CSS-based UI library for Python web frameworks. Built for maximum developer flexibility while providing excellent defaults.
> [!CAUTION]
> This library is not ready for anything yet. IN fact, this readme is more of design ideas than anything as much of what's in here isn't implemented yet!
## Design
### Base CSS
- `styles.css` : defines all the core css logic to create classes like `edios-mark`, `eidos-small`, etc.
- `light.css`/`dark.css` : These define lots of css variables used in `styles.css` and are themes
Users would create a custom theme by copying light/dark css files and changing the variable definitions.
### Styles
This has enums that make the Base CSS clases accessible in python. For example:
`styles.typography.h1` or `styles.buttons.primary`
### Tags
```python
def H1(*content, cls: str = None, **kwargs) -> air.H1:
"""Semantic H1 heading"""
return air.H1(*content, cls=stringify(styles.typography.h1, cls), **kwargs)
def Mark(*content, cls: str = None, **kwargs) -> air.Mark:
"""Highlighted text"""
return .Mark(*content, cls=stringify(styles.typography.mark, cls), **kwargs)
def Small(*content, cls: str = , **kwargs) -> air.Small:
"""Small text"""
return air.Small(*content, cls=stringify(styles.typography.small, cls), **kwargs)
```
### Components (Not Built Yet)
Theses are things that go beyond just exposing css to python. Here's a simple example of what might be added.
```python
class Table:
def __init__(self, cls: str = None, **kwargs):
"""Create an empty table with optional styling"""
self.cls = cls
self.kwargs = kwargs
@classmethod
def from_lists(cls, data: list[list], headers: list[str] = None, cls_: str = None, **kwargs):
"""Create table from list of lists"""
thead = []
if headers:
thead = THead(Tr(*[Th(header) for header in headers]))
tbody_rows = []
for data in row_data:
tbody_rows.append(Tr(*map(Td, row_data)))
tbody = TBody(*tbody_rows)
return Table(thead+tbody, cls=cls_, **kwargs)
@classmethod
def from_dicts(cls, data: list[dict], headers: list[str] = None, cls_: str = None, **kwargs):
"""Create table from list of dictionaries"""
thead = []
if headers:
thead = THead(Tr(*[Th(header) for header in headers]))
tbody_rows = []
for row in data:
tbody_rows.append(Tr(*[Td(row.get(header, "")) for header in (headers or list(row.keys()))]))
tbody = TBody(*tbody_rows)
return Table(thead+tbody, cls=cls_, **kwargs)
# Usage examples:
Table.from_lists([["A", "B"], ["C", "D"]], headers=["Col1", "Col2"])
Table.from_dicts([{"name": "John", "age": 25}], headers=["Name", "Age"])
```
## Plugins
### edios-md
This will be installable with `pip install "eidos[markdown]"`.
This is a plugin for rendering markdown that is well scoped to just markdown rendering. This module does markdown rendering well with table of contents with scrollspy, code highlighting, latex rendering, etc. It must be used with `EidosUI` as it uses css variables from there for the styling (so it is always in sync with the theme)
Raw data
{
"_id": null,
"home_page": null,
"name": "eidosui",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "air, components, css, fastapi, tailwind, ui, web",
"author": "Isaac Flath",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/7e/60/d25cc6f0487a1436ae7ffc045dc710062692b311360ea11f95bec6fd462f/eidosui-0.4.0.tar.gz",
"platform": null,
"description": "# EidosUI \ud83c\udfa8\n\nA modern, flexible Tailwind CSS-based UI library for Python web frameworks. Built for maximum developer flexibility while providing excellent defaults.\n\n> [!CAUTION]\n> This library is not ready for anything yet. IN fact, this readme is more of design ideas than anything as much of what's in here isn't implemented yet!\n\n\n## Design\n\n### Base CSS\n\n- `styles.css` : defines all the core css logic to create classes like `edios-mark`, `eidos-small`, etc.\n- `light.css`/`dark.css` : These define lots of css variables used in `styles.css` and are themes\n\nUsers would create a custom theme by copying light/dark css files and changing the variable definitions.\n\n### Styles\n\nThis has enums that make the Base CSS clases accessible in python. For example:\n\n`styles.typography.h1` or `styles.buttons.primary`\n\n### Tags\n\n```python\ndef H1(*content, cls: str = None, **kwargs) -> air.H1:\n \"\"\"Semantic H1 heading\"\"\"\n return air.H1(*content, cls=stringify(styles.typography.h1, cls), **kwargs)\n\ndef Mark(*content, cls: str = None, **kwargs) -> air.Mark:\n \"\"\"Highlighted text\"\"\"\n return .Mark(*content, cls=stringify(styles.typography.mark, cls), **kwargs)\n\ndef Small(*content, cls: str = , **kwargs) -> air.Small:\n \"\"\"Small text\"\"\"\n return air.Small(*content, cls=stringify(styles.typography.small, cls), **kwargs) \n```\n\n### Components (Not Built Yet)\n\nTheses are things that go beyond just exposing css to python. Here's a simple example of what might be added.\n\n```python\nclass Table:\n def __init__(self, cls: str = None, **kwargs):\n \"\"\"Create an empty table with optional styling\"\"\"\n self.cls = cls\n self.kwargs = kwargs\n \n @classmethod\n def from_lists(cls, data: list[list], headers: list[str] = None, cls_: str = None, **kwargs):\n \"\"\"Create table from list of lists\"\"\"\n thead = []\n if headers:\n thead = THead(Tr(*[Th(header) for header in headers]))\n \n tbody_rows = []\n for data in row_data:\n tbody_rows.append(Tr(*map(Td, row_data)))\n tbody = TBody(*tbody_rows)\n \n return Table(thead+tbody, cls=cls_, **kwargs)\n \n @classmethod\n def from_dicts(cls, data: list[dict], headers: list[str] = None, cls_: str = None, **kwargs):\n \"\"\"Create table from list of dictionaries\"\"\"\n thead = []\n if headers:\n thead = THead(Tr(*[Th(header) for header in headers]))\n \n tbody_rows = []\n for row in data:\n tbody_rows.append(Tr(*[Td(row.get(header, \"\")) for header in (headers or list(row.keys()))]))\n tbody = TBody(*tbody_rows)\n \n return Table(thead+tbody, cls=cls_, **kwargs)\n\n# Usage examples:\nTable.from_lists([[\"A\", \"B\"], [\"C\", \"D\"]], headers=[\"Col1\", \"Col2\"])\nTable.from_dicts([{\"name\": \"John\", \"age\": 25}], headers=[\"Name\", \"Age\"])\n```\n\n## Plugins\n\n### edios-md\n\nThis will be installable with `pip install \"eidos[markdown]\"`. \n\nThis is a plugin for rendering markdown that is well scoped to just markdown rendering. This module does markdown rendering well with table of contents with scrollspy, code highlighting, latex rendering, etc. It must be used with `EidosUI` as it uses css variables from there for the styling (so it is always in sync with the theme)\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A modern, Tailwind CSS-based UI library for air development",
"version": "0.4.0",
"project_urls": {
"Documentation": "https://github.com/isaac-flath/EidosUI#readme",
"Homepage": "https://github.com/isaac-flath/EidosUI",
"Issues": "https://github.com/isaac-flath/EidosUI/issues",
"Repository": "https://github.com/isaac-flath/EidosUI"
},
"split_keywords": [
"air",
" components",
" css",
" fastapi",
" tailwind",
" ui",
" web"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7128f1bb31a682e2d6545684a142337ecd75a326240fe9d8171200331cb4693a",
"md5": "c30ca1897e0097a9b50df6ecb7044891",
"sha256": "b7fd3f05d8ca06c632dbad41dffd847bdf957a729590664dda718c6509accadc"
},
"downloads": -1,
"filename": "eidosui-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c30ca1897e0097a9b50df6ecb7044891",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 22264,
"upload_time": "2025-07-13T03:17:47",
"upload_time_iso_8601": "2025-07-13T03:17:47.179179Z",
"url": "https://files.pythonhosted.org/packages/71/28/f1bb31a682e2d6545684a142337ecd75a326240fe9d8171200331cb4693a/eidosui-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7e60d25cc6f0487a1436ae7ffc045dc710062692b311360ea11f95bec6fd462f",
"md5": "ef96347ab92dc48a59c7f4132ad7990b",
"sha256": "51ca1e09f22a14f22ff50036171f8d1e91f5e00da3f1a076cd64ac48d5a74ad2"
},
"downloads": -1,
"filename": "eidosui-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "ef96347ab92dc48a59c7f4132ad7990b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 18660,
"upload_time": "2025-07-13T03:17:48",
"upload_time_iso_8601": "2025-07-13T03:17:48.283374Z",
"url": "https://files.pythonhosted.org/packages/7e/60/d25cc6f0487a1436ae7ffc045dc710062692b311360ea11f95bec6fd462f/eidosui-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-13 03:17:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "isaac-flath",
"github_project": "EidosUI#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "eidosui"
}