{"id":18756820,"url":"https://github.com/code-shoily/lotus","last_synced_at":"2025-11-30T11:30:14.451Z","repository":{"id":76051218,"uuid":"441830115","full_name":"code-shoily/lotus","owner":"code-shoily","description":"SurfaceUI wrapper for UIKit","archived":false,"fork":false,"pushed_at":"2021-12-26T22:59:19.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-29T02:31:33.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/code-shoily.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}},"created_at":"2021-12-26T07:02:43.000Z","updated_at":"2022-10-17T20:46:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d937f49-47e1-4111-81e7-0da76dfaa77d","html_url":"https://github.com/code-shoily/lotus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Flotus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Flotus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Flotus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-shoily%2Flotus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-shoily","download_url":"https://codeload.github.com/code-shoily/lotus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239644075,"owners_count":19673582,"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":"2024-11-07T17:38:10.920Z","updated_at":"2025-11-30T11:30:14.418Z","avatar_url":"https://github.com/code-shoily.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lotus\n\nLotus is a [Surface UI](https://surface-ui.org/) wrapper for [UIKit](https://getuikit.com/). Make good looking UIs in LiveView + SurfaceUI + (a little) JavaScript.\n\n## How to run?\n\n* Install the deps with `mix deps.get`\n* Install the JS libs with `cd assets; yarn`\n* Get back to the project directory (i.e. Type `cd ..` if you're still inside `assets` from the previous step)\n* `mix esbuild.install` to install esbuild.\n* `mix esbuild default` to get the assets in the `catalogue` repository.\n* `mix dev` to run the development server for the catalogue\n* Make changes to the components and test the API out in `http://localhost:4001` via examples or playgrounds.\n\nAll components are under the `Lotus` section.\n\nThis has been tested with Phoenix 1.6.x and Elixir 1.13.x with OTP 24.\n\n## Install in Phoenix\n\n* This module uses hooks and registers them. To use with Phoenix, add `{:lotus, path: \"\u003cpath of this\u003e\" }` and also add `:surface` to the `compilers` in `mix.exs`.\n\n* Install UIKit using your preferred method (either CDN, npm or Esbuild). \n\n* Import the components in your live view!\n\n## Example\n\nThis library wraps UIKit 3 with SurfaceUI. They are a set of Surface components that allow you to use those components without using any JavaScript. For example, the following snippet produces accordion:\n\n```\n\u003cAccordion id=\"accordion\"\u003e\n    \u003cAccordionItem title=\"Section 1\"\u003e\n        Lorem Ipsum\n    \u003c/AccordionItem\u003e\n    \u003cAccordionItem title=\"Section 2\"\u003e\n        Lorem Ipsum\n    \u003c/AccordionItem\u003e\n    \u003cAccordionItem open title=\"Section 3\"\u003e\n        Lorem Ipsum\n    \u003c/AccordionItem\u003e\n    \u003cAccordionItem title=\"Section 4\"\u003e\n        Lorem Ipsum\n    \u003c/AccordionItem\u003e\n\u003c/Accordion\u003e\n```\n\n## How to make a new component?\n\nIdeally, the method to make a new component is to create an Elixir file `lotus/\u003ccomponent.ex\u003e` along with the test file and entries in the catalogue. There are three types of component a component can be of-\n\n* `Lotus.SimpleComponent` - Components that are simple, use mostly padding, margin, text etc\n* `Lotus.Component` - Components that take a little more than Simple ones like width, border-radius etc\n* `Lotus.ContainerComponent` - Components that are mostly containers, as such have grid and flex capabilities\n\nDepending on the capability we wish to have for our component, it can `use` either. For example, a `Progress` is a `SimpleComponent` but a `Card` is a `ContainerComponent`.\n\nEach of these components have multiple `Props`. A `Prop` module is a set of module that other components can `use`. They are listed under `lotus/props` directory. Props examples could be `Padding`, `Margin`, `Background`, `Text`. A component having `Text` props will be empowered with various text helper properties such as `font_size`, `text_align` etc, and as such, upon filling up those props, will acquire the `UIkit` classes that facilitate those.\n\nDifferent components can be a sum-total of these props.\n\n## Thank You!\n\n- SurfaceUI - https://surface-ui.org/\n- Surface Catalogue - https://github.com/surface-ui/surface_catalogue\n- Surface Bulma - https://github.com/surface-ui/surface_catalogue I got a lot of inspiration from this one! I've been wanting to make something like this since I knew of it!\n- Surface Bootstrap - https://github.com/surface-ui/surface_bootstrap thanks to this project, I learned how to run Catalogue server, and also gained confidence in structuring components.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-shoily%2Flotus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-shoily%2Flotus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-shoily%2Flotus/lists"}