{"id":16355976,"url":"https://github.com/timobechtel/svelte-component-example","last_synced_at":"2026-05-02T19:33:00.090Z","repository":{"id":47858579,"uuid":"261580255","full_name":"TimoBechtel/svelte-component-example","owner":"TimoBechtel","description":"Example reusable ui components with svelte","archived":false,"fork":false,"pushed_at":"2022-07-15T16:45:26.000Z","size":185,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T12:32:47.559Z","etag":null,"topics":["components","reusable","svelte"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimoBechtel.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":"2020-05-05T20:50:43.000Z","updated_at":"2023-03-07T02:39:31.000Z","dependencies_parsed_at":"2022-09-11T12:20:51.397Z","dependency_job_id":null,"html_url":"https://github.com/TimoBechtel/svelte-component-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TimoBechtel/svelte-component-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimoBechtel%2Fsvelte-component-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimoBechtel%2Fsvelte-component-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimoBechtel%2Fsvelte-component-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimoBechtel%2Fsvelte-component-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimoBechtel","download_url":"https://codeload.github.com/TimoBechtel/svelte-component-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimoBechtel%2Fsvelte-component-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32547647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["components","reusable","svelte"],"created_at":"2024-10-11T01:42:18.344Z","updated_at":"2026-05-02T19:33:00.070Z","avatar_url":"https://github.com/TimoBechtel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte Component Example\n\nThis is a small example for creating reusable components with Svelte.\nIt's a pretty basic example, but it includes Storybook, Testing with Jest and Variable Colors.\n\nIn a real scenario, you probably have the components in separat repositories or in a component library. For this example, I've thrown everything in this repo.\n\n## Contents\n\n### button/\n\nThis is the main example component. It includes storybook stories and tests using jest.\n\nFor simplifying this example, I just exported the Svelte source files in the package.json, however when you want to use it in a project without svelte, you may want to add a bundler configuration (e.g. rollup).\n\n- install with npm `cd example/ \u0026\u0026 npm i`\n- run storybook `npm run storybook`\n- run tests `npm run test`\n\n**Note:**\nThe button component uses a slot. Because, as of right now (PR4296), we cannot render slots with the component constructor. So I added a `ButtonTestWrapper.svelte` component that is used to render the button's slot.\n\n### example/\n\nThis is an example project that uses the button component and bundles it into a web page.\n\n- install `cd button/ \u0026\u0026 npm i`\n- serve website `npm run dev`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimobechtel%2Fsvelte-component-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimobechtel%2Fsvelte-component-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimobechtel%2Fsvelte-component-example/lists"}