{"id":25545348,"url":"https://github.com/webfruits/toolbox","last_synced_at":"2026-02-09T04:30:17.551Z","repository":{"id":57169380,"uuid":"178076600","full_name":"webfruits/toolbox","owner":"webfruits","description":"Additional features like SVGComponent, GridLayout and a lot of utilities based on webfruits/core","archived":false,"fork":false,"pushed_at":"2022-05-12T10:42:01.000Z","size":175,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-17T18:56:35.101Z","etag":null,"topics":["library","toolbox","typescript","webfruit"],"latest_commit_sha":null,"homepage":"https://webfruits.io","language":"TypeScript","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/webfruits.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-27T21:23:27.000Z","updated_at":"2022-01-09T19:17:50.000Z","dependencies_parsed_at":"2022-09-04T11:00:09.309Z","dependency_job_id":null,"html_url":"https://github.com/webfruits/toolbox","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfruits%2Ftoolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfruits%2Ftoolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfruits%2Ftoolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfruits%2Ftoolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webfruits","download_url":"https://codeload.github.com/webfruits/toolbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239742365,"owners_count":19689307,"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":["library","toolbox","typescript","webfruit"],"created_at":"2025-02-20T08:19:07.673Z","updated_at":"2026-02-09T04:30:17.501Z","avatar_url":"https://github.com/webfruits.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://webfruits.io/assets/wf-small-toolbox-logo.svg\" alt=\"wf core logo\" height=\"50px\"\u003e\n\n# webfruits/toolbox \u0026nbsp; [![Language TypeScript](https://img.shields.io/badge/language-TypeScript-green.svg)](https://www.typescriptlang.org) [![GitHub license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) ![GitHub package.json version](https://img.shields.io/github/package-json/v/webfruits/toolbox.svg?color=green\u0026label=master\u0026logo=github) [![npm version](https://img.shields.io/npm/v/@webfruits/toolbox.svg?color=green)](https://www.npmjs.com/package/@webfruits/toolbox) \n\n... depends on [webfruits/core](https://github.com/webfruits/core), a library to create highly customized, fast and interactive user interfaces using the real DOM and not a virtual one. It is super slim, modular and has no dependencies. All declarations and coding can be done with TypeScript. There is no need to learn any proprietary template language.\n\n## What is inside this toolbox\nYou'll find generic components, controllers and many utility classes, which will grow over time.  \nBelow you'll find some examples. For further details please have a look at the [source code](src).  \n\n### Components\n#### GridLayout\n.. creates a simple grid of columns. Column gap und number of columns can be set anytime.  \n```typescript\nimport {GridLayout} from \"./components/layout/GridLayout\";\nimport {UIComponent} from \"@webfruits/core\";\n\nlet gridLayout = new GridLayout();\n\ngridLayout.numColumns = 2;\ngridLayout.gapWidth = 20;\n\ngridLayout.addChild(new UIComponent(\"grid-item-1\"));\ngridLayout.addChild(new UIComponent(\"grid-item-2\"));\n```\n#### SVGComponent\n... parses a svg string to a `SVGElement` which then can be modified in any way. \n```typescript\nimport {RequestUtils} from \"./utils/RequestUtils\";\nimport {SVGComponent} from \"./components/svg/SVGComponent\";\n\nRequestUtils.getURL(\"assets/logo.svg\", (svg: string) =\u003e {\n     let svgComponent = new SVGComponent(svg);\n     let logoBackground: SVGElement = svgComponent.getElementByID(\"background\");\n    logoBackground.style.backgroundColor = \"red\"\n});\n```\n### Controller\n#### SwipeController\n... dispatches `Signals` when swipe gestures were recognized on an `HTMLElement`.\n```typescript\nimport {SwipeController} from \"./controller/input/SwipeController\";\n\nlet swipeController = new SwipeController(htmlElement);\nswipeController.onRightSwipeSignal.add(() =\u003e console.log(\"onSwipedToTheRight\"));\nswipeController.onLeftSwipeSignal.add(() =\u003e console.log(\"onSwipedToTheLeft\"));\n```\n#### WheelController\n... dispatches `Signals` when scroll or vertical swipe gestures were regonized on an `HTMLElement` \n```typescript\nimport {WheelController} from \"./controller/input/WheelController\";\n\nlet wheelController = new WheelController(htmlElement);\nwheelController.onUpSignal.add(() =\u003e console.log(\"onScrolledUp or onSwipedUp\"));\nwheelController.onDownSignal.add(() =\u003e console.log(\"onScrolledDown or onSwipedDown\"));\n```\n\n## more webfruits\n\n- **[webfruits/core](https://github.com/webfruits/core)**  \na TypeScript library for building user interfaces using the real DOM.\n\n- **[webfruits/best-practice](https://github.com/webfruits/best-practice)**  \nour recommondation of how to structure an application using webfruits.\n\n- **[webfruits/webpack-starterkit](https://github.com/webfruits/webpack-starterkit)**  \nis a basic webpack setup and skeleton for an webfruits application.\n\n\n## Licence\nwebfruits/toolbox is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfruits%2Ftoolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebfruits%2Ftoolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfruits%2Ftoolbox/lists"}