{"id":13859065,"url":"https://github.com/ryu-man/svantic","last_synced_at":"2025-08-16T17:32:01.537Z","repository":{"id":44591688,"uuid":"334750820","full_name":"ryu-man/svantic","owner":"ryu-man","description":"Svantic is a set of UI components for Svelte framework based on the Fomantic-UI library","archived":false,"fork":false,"pushed_at":"2022-02-16T10:32:05.000Z","size":7067,"stargazers_count":17,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-07T00:39:56.724Z","etag":null,"topics":["css","fomantic-ui","html","javascript","semantic-ui","svelte","ui","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Svelte","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/ryu-man.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}},"created_at":"2021-01-31T20:32:28.000Z","updated_at":"2024-10-04T15:59:11.000Z","dependencies_parsed_at":"2022-09-05T13:21:05.198Z","dependency_job_id":null,"html_url":"https://github.com/ryu-man/svantic","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu-man%2Fsvantic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu-man%2Fsvantic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu-man%2Fsvantic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryu-man%2Fsvantic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryu-man","download_url":"https://codeload.github.com/ryu-man/svantic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230047181,"owners_count":18164575,"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":["css","fomantic-ui","html","javascript","semantic-ui","svelte","ui","ui-components"],"created_at":"2024-08-05T03:02:31.287Z","updated_at":"2024-12-17T01:16:26.372Z","avatar_url":"https://github.com/ryu-man.png","language":"Svelte","funding_links":[],"categories":["Svelte"],"sub_categories":[],"readme":"\u003cp style=\"text-align:center\"\u003e\n  \u003cimg alt=\"SVANTIC\" src=\"./banner_new.png\" width=\"100%\"/\u003e\n    \u003cspan style=\"font-size:24pt; color:white;\"\u003e\n    A set of UI components for \u003ca href=\"https://svelte.dev\"\u003eSvelte\u003c/a\u003e framework based on \u003ca href=\"http://fomantic-ui.com\"\u003eFomantic-UI\u003c/a\u003e library\n    \u003c/span\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://www.npmjs.com/package/svantic\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/svantic.svg?style=flat-square\" alt=\"npm version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ryu-man/svantic/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/svantic.svg?style=flat-square\" alt=\"license\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Documentation\n\n-- Coming soon --\n\n## Installation\n\n```bash\n# npm\nnpm install svantic\n# yarn\nyarn add svantic\n```\n\n## Quick start with new project\n\nCreate a new project based on [sveltejs/template](https://github.com/sveltejs/template)\n\n```bash\nnpx degit sveltejs/template svantic-app\ncd svantic-app\n# npm\nnpm install\n# yarn\nyarn install\n```\n\nOr you can use our [svantic template](https://github.com/ryu-man/svantic-template), it comes pre-configured\n\n```bash\nnpx degit ryu-man/svantic-template#main svantic-app\ncd svantic-app\n# npm\nnpm install\n# yarn\nyarn install\n```\n\n\u003c!-- Or you can our svantic-template --\u003e\n\n_NOTE: There are of course other ways to set up a project using svelte. This is just the quickest way to start._\n\n### Rollup Configuration\n\nBecause svantic uses dymanic import for better footprint and performance you have to configure rollup as following:\n\n```js\n\noutput: {\n  ...,\n  dir: \"path to output directory\",\n  entryFileNames: \"index.js\",\n  chunkFileNames: \"[name].js\"\n},\n\n```\n\n## Breaking Change\n\n\n### Svantic component\n used to load global scripts and stylesheets, must mounted on the top level of the app\n\n ```html\n \u003cscript\u003e\n  import { Svantic, ... } from 'svantic'\n\u003c/script\u003e\n\n// \n\u003cSvantic\u003e\n  ...\n\u003c/Svantic\u003e\n ```\n\n### onMount prop\nallows acces to the top level dom elem instead of module controller\n\n### module controller\nto controll a module you use bind:this={varname} on the component to save an instance of its controller\n\n### controllable store\nis a reactive store that allows subscribtion to a module and execute a callback when the component is mounted\n```html\n\u003cscript\u003e\n    // import modules\n    import { Dropdown, controllable, Svantic } from 'svantic';\n\n    const dropdownController = controllable(controller=\u003e{\n      // do something\n    })\n\u003c/script\u003e\n\n\u003cSvantic\u003e\n  \u003cDropdown bind:this={$dropdownController}\u003e\n      // ...\n  \u003c/Dropdown\u003e\n\u003c/Svantic\u003e\n```\n  \n\n## Usage\n\nAdd svantic and modify `src/App.svelte` file in the following way\n\n```html\n\u003cscript\u003e\n  // import any components you want\n  import { Button, Svantic } from 'svantic'\n\u003c/script\u003e\n\n\u003cSvantic\u003e\n  \u003cButton\u003eHello world\u003c/Button\u003e\n\u003c/Svantic\u003e\n```\n\nor\n\n```html\n\u003cscript\u003e\n    // import modules\n    import { Dropdown, initDropdown, controllable, Icon, Svantic } from 'svantic';\n\n    // call this function if you want to use Module.SubModule syntax, ex: Dropdown.Item\n    initDropdown()\n\n    const dropdownController = controllable(controller=\u003e{\n      // called when the component is mounted and ready\n      // access the controller and manupilate dropdown\n    })\n\n\n\u003c/script\u003e\n\n// mount Svantic component on the top level of the app\n\u003cSvantic\u003e\n  // onMount: allows control module behaviors\n  // settings: pass module settings\n  \u003cDropdown \n    bind:this={$dropdownController} \n    onMount={(domElem) =\u003e {}} \n    settings={{}}\n    selection \u003e\n    \u003cIcon name=\"caret down\" /\u003e\n    \u003cDropdown.Text\u003eSelect language\u003c/Dropdown.Text\u003e\n    \u003cDropdown.Menu\u003e\n      \u003cDropdown.Item\u003eEnglish\u003c/Dropdown.Item\u003e\n      \u003cDropdown.Item\u003eArabic\u003c/Dropdown.Item\u003e\n      \u003cDropdown.Item\u003eSpanish\u003c/Dropdown.Item\u003e\n      \u003cDropdown.Item\u003eGerman\u003c/Dropdown.Item\u003e\n    \u003c/Dropdown.Menu\u003e\n  \u003c/Dropdown\u003e\n\u003c/Svantic\u003e\n```\n\nAnother way to use Module.SubModule syntax\n\n```html\n\u003cscript\u003e\n    import { Icon, Svantic } from 'svantic'\n    import * as Dropdown from 'svantic/modules/dropdown';\n\u003c/script\u003e\n\n\u003cSvantic\u003e\n  \u003cDropdown.default selection \u003e\n    \u003cIcon name=\"caret down\" /\u003e\n    \u003cDropdown.Text\u003eSelect language\u003c/Dropdown.Text\u003e\n    \u003cDropdown.Menu\u003e\n      \u003cDropdown.Item\u003eEnglish\u003c/Dropdown.Item\u003e\n      \u003cDropdown.Item\u003eArabic\u003c/Dropdown.Item\u003e\n      \u003cDropdown.Item\u003eSpanish\u003c/Dropdown.Item\u003e\n      \u003cDropdown.Item\u003eGerman\u003c/Dropdown.Item\u003e\n    \u003c/Dropdown.Menu\u003e\n  \u003c/Dropdown.default\u003e\n\u003c/Svantic\u003e\n```\n\n## Development\n\n1. Clone this repo: `git clone https://github.com/ryu-man/svantic.git`\n2. Install dependencies: `npm i`\n3. Start building fomantic: `npm run build:fomantic`\n\n## License\n\nCode released under [MIT license](./Licence)\n\nCopyright \u0026copy; - ryu-man.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryu-man%2Fsvantic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryu-man%2Fsvantic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryu-man%2Fsvantic/lists"}