{"id":31667891,"url":"https://github.com/exddc/svelte-mac-keyboard","last_synced_at":"2026-05-18T03:11:27.797Z","repository":{"id":318368589,"uuid":"1070952691","full_name":"exddc/svelte-mac-keyboard","owner":"exddc","description":"A customizable and animated Mac-style keyboard component for Svelte. It visually responds to both keyboard and mouse events.","archived":false,"fork":false,"pushed_at":"2025-10-06T18:48:53.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-06T20:37:44.826Z","etag":null,"topics":["components","keyboard","mac","svelte","sveltekit"],"latest_commit_sha":null,"homepage":"https://svelte-mac-keyboard.vercel.app","language":"Svelte","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/exddc.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T16:56:52.000Z","updated_at":"2025-10-06T18:49:37.000Z","dependencies_parsed_at":"2025-10-06T20:37:46.952Z","dependency_job_id":"637ed723-c26f-4433-9994-aeca1ca8feae","html_url":"https://github.com/exddc/svelte-mac-keyboard","commit_stats":null,"previous_names":["exddc/svelte-mac-keyboard"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/exddc/svelte-mac-keyboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exddc%2Fsvelte-mac-keyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exddc%2Fsvelte-mac-keyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exddc%2Fsvelte-mac-keyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exddc%2Fsvelte-mac-keyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exddc","download_url":"https://codeload.github.com/exddc/svelte-mac-keyboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exddc%2Fsvelte-mac-keyboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33163444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","keyboard","mac","svelte","sveltekit"],"created_at":"2025-10-08T00:49:07.897Z","updated_at":"2026-05-18T03:11:27.792Z","avatar_url":"https://github.com/exddc.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte Mac Keyboard\n\nA customizable and animated Mac-style keyboard component for Svelte. It visually responds to both keyboard and mouse events.\n\n![Svelte Mac Keyboard Preview](https://static.timoweiss.me/Screenshot%202025-10-06%20at%2020.45.39.png)\n\n## Setup and Running the Project\n\n1.  **Clone the repository:**\n    ```sh\n    git clone https://github.com/timoweiss/svelte-mac-keyboard.git\n    cd svelte-mac-keyboard\n    ```\n\n2.  **Install dependencies:**\n    ```sh\n    bun install\n    ```\n\n3.  **Run the development server:**\n    ```sh\n    bun run dev\n    ```\n    The application will be available at `http://localhost:5173`.\n\n## How to Use in Another Project\n\n1.  **Copy the component:**\n    Copy the `keyboard.svelte` file from `src/lib/components/` into your own Svelte project's components directory. Also, copy the `utils.ts` file from `src/lib/` for class name utility if you didn't install shadcn/ui yet.\n\n2.  **Import the component:**\n    In your Svelte file, import the `Keyboard` component:\n    ```svelte\n    \u003cscript lang=\"ts\"\u003e\n        import Keyboard from './path/to/keyboard.svelte';\n    \u003c/script\u003e\n\n    \u003cKeyboard /\u003e\n    ```\n\n## Customization\n\nYou can customize the keyboard's appearance and layout directly within the `keyboard.svelte` file.\n\n-   **Props:**\n    You can customize the keyboard's behavior with the following props:\n    -   `showFunctionRow`: A boolean to show or hide the function key row (default: `true`).\n        ```svelte\n        \u003cKeyboard showFunctionRow={false} /\u003e\n        ```\n\n-   **Styling:**\n    Modify the style constants at the top of the script section to change colors, fonts, and borders.\n    ```javascript\n    const BG_COLOR = 'bg-[#67666b]';\n    const KEY_BG_COLOR = 'bg-[#161920]';\n    // ... and so on\n    ```\n\n-   **Layout:**\n    The `keyboardLayout` array defines the structure of the keyboard. You can add, remove, or reorder keys by editing this array. Each key object can have properties like `code`, `label`, `size`, etc.\n    ```javascript\n    const keyboardLayout: Key[][] = [\n        [\n            { code: 'Backquote', label: '`', shiftLabel: '~' },\n            // ... more keys\n        ],\n        // ... more rows\n    ];\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexddc%2Fsvelte-mac-keyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexddc%2Fsvelte-mac-keyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexddc%2Fsvelte-mac-keyboard/lists"}