{"id":17910619,"url":"https://github.com/golota60/oxytail","last_synced_at":"2025-03-23T22:32:56.999Z","repository":{"id":215968918,"uuid":"736198656","full_name":"golota60/oxytail","owner":"golota60","description":"Native cross-platform styled widgets library based on Floem.","archived":false,"fork":false,"pushed_at":"2024-01-30T20:08:31.000Z","size":209,"stargazers_count":18,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-07T11:11:17.023Z","etag":null,"topics":["daisyui","floem","floem-themes","gui","native","rust","ui"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/golota60.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2023-12-27T08:48:39.000Z","updated_at":"2024-10-04T00:29:35.000Z","dependencies_parsed_at":"2024-01-17T17:38:13.401Z","dependency_job_id":"c638ad57-a0fa-45f6-aeb4-112caed52363","html_url":"https://github.com/golota60/oxytail","commit_stats":null,"previous_names":["golota60/oxytail"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golota60%2Foxytail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golota60%2Foxytail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golota60%2Foxytail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golota60%2Foxytail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golota60","download_url":"https://codeload.github.com/golota60/oxytail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221919188,"owners_count":16901756,"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":["daisyui","floem","floem-themes","gui","native","rust","ui"],"created_at":"2024-10-28T19:33:13.668Z","updated_at":"2024-10-28T19:33:14.461Z","avatar_url":"https://github.com/golota60.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003eOxytail\u003c/h1\u003e\n\t\u003cp\u003e\n\t\t\u003cb\u003eStyled widget library built on top of \u003ca href=\"https://github.com/lapce/floem\"\u003efloem\u003c/a\u003e, inspired by \u003ca href=\"https://daisyui.com/components/button/\"\u003edaisyUI\u003c/a\u003e\u003c/b\u003e\n\t\u003c/p\u003e\n\t\u003cbr\u003e\n\u003c/div\u003e\n\nFeatures:\n - Cross-system support\n - HIGHLY customizable - modify and create [your own themes](YOUR_OWN_THEME.md) easily\n - Supports dynamic theme switching(example needed!)\n - Built on top of [Floem](https://github.com/lapce/floem)\n - Loosely inspired by [daisyUI](https://daisyui.com/components/button/)\n\n\nShowcase:\n\n\u003cimg src=\"https://github.com/golota60/oxytail/blob/main/img/demo.png\"\u003e\n\n## Installation\n\n`oxytail` consists of the main \"base\" package(`oxytail-base`), which loads the theme you want, and theme packages(currently only `oxytail-theme-dark`. More coming soon!).\n\nNext, you need to choose your theme, and install it. Currently, `oxytail` comes with only one theme, `oxytail-theme-dark`, but if it doesn't suit your needs you can easily [write your own one](YOUR_OWN_THEME.md). It's still early days for this project, so some widgets are missing.\n\nFirst, add `floem`, `oxytail-base`(to load a theme) and `oxytail-theme-dark`(or any other theme) \n\n```\ncargo add floem oxytail-base oxytail-theme-dark\n```\n\nDone! Now, initialize the theme, and simply use `floem` like normal, *except* import your widgets from `oxytail-base` instead! You can't mix\u0026match both `floem` and `oxytail` widgets as needed.\n\n```rs\nuse floem::kurbo::Size;\nuse floem::peniko::Color;\nuse floem::reactive::create_signal;\nuse floem::view::View;\nuse floem::views::{h_stack, label, v_stack, Decorators};\nuse floem::window::WindowConfig;\nuse floem::Application;\nuse oxytail_base::{init_theme, widgets::button::button};\nuse oxytail_theme_dark::Theme;\n\nfn app_view() -\u003e impl View {\n    // Create a reactive signal with a counter value, defaulting to 0\n    let (counter, set_counter) = create_signal(0);\n\n    // Create a vertical layout\n    v_stack((\n        // The counter value updates automatically, thanks to reactivity\n        label(move || format!(\"Value: {}\", counter.get())),\n        // Create a horizontal layout\n        h_stack((\n            button(|| \"Increment\", None).on_click_stop(move |_| {\n                set_counter.update(|value| *value += 1);\n            }),\n            button(|| \"Decrement\", None).on_click_stop(move |_| {\n                set_counter.update(|value| *value -= 1);\n            }),\n        )),\n    ))\n}\n\nfn main() {\n    let window_config = WindowConfig::default()\n        .size(Size {\n            width: 1200.0,\n            height: 500.0,\n        })\n        // 1. We don't want any default `floem` styling to be interfering with ours,\n        // so we need to disable the default styling.\n        .apply_default_theme(false);\n\n    // 2. We need to initialize our theme\n    init_theme(Theme::Dark);\n    // That's all! Now import some widgets from `oxytail_base` and you're using oxytail!\n\n    let root_view = app_view();\n    let root_view = root_view.style(|s| {\n        s.width_full()\n            .background(Color::rgb8(29, 35, 42))\n            .color(Color::rgb8(166, 173, 187))\n            .padding(16.)\n    });\n\n    let app = Application::new().window(move |_| root_view, Some(window_config));\n\n    app.run();\n}\n\n\n```\n\n## Documentation/Examples\n\nThe best showcase is `examples/widget-gallery` package. Run it with `cargo run -p widget-gallery`. Docs.rs soon. \n\n## Contributing\n\nIf you notice any bugs, missing features or nice-to-haves, don't hesistate to open an issue.\n\nIf you want to submit a custom theme(or just link your own in this README for other people to know) to be a part of this library, also don't hesitate and simply create a new package in the workspace(see `oxytail-theme-dark` folder for guidance).[writing your own theme](YOUR_OWN_THEME.md)\n\nIf you need some widgets which currently don't exist, please consider submitting them to the upstream `floem` library first.\n\nIf you think some of the docs are unclear, also feel free to create an issue!\n\n\n## Roadmap\n\nObviously, we do not have many widgets which are present in daisyUI. The most immediate roadmap focuses on two things: More widgets, more prop support and more themes.\n\nExpect breaking changes.\n\nShort term roadmap(primitives only):\n\n- [x] Toggles(`toggle`)\n- [x] Visual Dividers(`text_divider`)\n- [x] Radio buttons(`radio_button`)\n- [x] H1/H2/H3/H4/H5 Equivalents(`text_header`)\n- [ ] Dropdowns/Selects\n- [x] Tooltips\n- [ ] Badges\n- [ ] Progress bars\n- [ ] [your suggestion](https://github.com/golota60/oxytail/issues/new)\n\n## Notes\n\nThe idea for this project came from my slight frustration when developing this [tauri-based desk manager app](https://github.com/golota60/trayasen). While for that project tauri is an awesome pick, I was looking for a native solution, i.e. not using system WebView. I've chosen `floem` as a base, because of their really friendly and extensible styling.\n\nI'm only aware of one other widget library for floem, and it's [floem-ui-kit](https://github.com/pieterdd/floem-ui-kit). I really like the simplicity of it, but I wanted something more customizable.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolota60%2Foxytail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolota60%2Foxytail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolota60%2Foxytail/lists"}