{"id":29777522,"url":"https://github.com/buraksakalli/keycap","last_synced_at":"2025-07-27T11:06:26.609Z","repository":{"id":205617735,"uuid":"714667993","full_name":"buraksakalli/keycap","owner":"buraksakalli","description":"🔠 Keycap: A React UI library for dynamic keyboard components with custom styles, powered by Vite.","archived":false,"fork":false,"pushed_at":"2024-10-10T16:15:18.000Z","size":51,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-27T02:49:28.216Z","etag":null,"topics":["hacktoberfest","keycap","react","react-typescript"],"latest_commit_sha":null,"homepage":"https://keycap.vercel.app","language":"TypeScript","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/buraksakalli.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}},"created_at":"2023-11-05T14:54:48.000Z","updated_at":"2025-07-21T10:27:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"15b299e8-4e19-4c09-8900-d68835ac4fce","html_url":"https://github.com/buraksakalli/keycap","commit_stats":null,"previous_names":["buraksakalli/keycap"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/buraksakalli/keycap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buraksakalli%2Fkeycap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buraksakalli%2Fkeycap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buraksakalli%2Fkeycap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buraksakalli%2Fkeycap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buraksakalli","download_url":"https://codeload.github.com/buraksakalli/keycap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buraksakalli%2Fkeycap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267311525,"owners_count":24067768,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["hacktoberfest","keycap","react","react-typescript"],"created_at":"2025-07-27T11:06:23.408Z","updated_at":"2025-07-27T11:06:26.604Z","avatar_url":"https://github.com/buraksakalli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keycap\n\n[![npm version](https://badge.fury.io/js/keycap.svg)](https://badge.fury.io/js/keycap)\n![keycap](https://github.com/buraksakalli/keycap/assets/10114716/ea114e89-6fbc-47c6-ad87-b71046cec882)\n\nKeycap is a lightweight, customizable keyboard key (kbd) component for React. It's designed to visually represent keyboard keys in your user interface, complete with a \"pressed\" style to give users feedback when keys are active.\n\n## Preview\n\nYou can see a live demo [here](https://keycap.vercel.app/).\n\n## Features\n\n- Lightweight with no external dependencies.\n- Easy to use and integrate into your React projects.\n- Customizable styles for both light and dark mode.\n- Pressed key state for interactive feedback.\n\n## Installation\n\nTo install the package, use npm:\n\n```bash\nnpm install keycap\n\nor yarn:\n\nyarn add keycap\n```\n\n## Usage\n\nHere is a basic example of how to use the `Keycap` component:\n\n```jsx\nimport { Keycap } from \"keycap\";\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      \u003cKeycap activeKey=\"A\"\u003eA\u003c/Keycap\u003e\n      \u003cKeycap activeKey=\"B\"\u003eB\u003c/Keycap\u003e\n      \u003cKeycap activeKey=\"C\"\u003eC\u003c/Keycap\u003e\n      \u003cKeycap activeKey=\"Meta\"\u003e⌘\u003c/Keycap\u003e\n      \u003cKeycap activeKey=\"Enter\"\u003e↵\u003c/Keycap\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n## Props\n\n- `activeKey`: (string) The key that the `Keycap` component should respond to.\n- `children`: (node) The content to display inside the keycap, typically a single letter or symbol.\n- `className`: (string) Optional. A class name to add custom styles to the keycap.\n\n## Styling\n\nThe component uses the following CSS variables for theming, which you can override in your stylesheet:\n\n```css\n/* Light Mode */\n--keycap-text-color: rgb(150, 159, 175);\n--keycap-gradient: linear-gradient(\n  -225deg,\n  rgb(213, 219, 228) 0%,\n  rgb(248, 248, 248) 100%\n);\n--keycap-key-shadow: inset 0 -2px 0 0 rgb(205, 205, 230), inset 0 0 1px 1px #fff,\n  0 1px 2px 1px rgba(30, 35, 90, 0.4);\n--keycap-key-pressed-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff,\n  0 1px 1px 0 rgba(30, 35, 90, 0.4);\n\n/* Dark Mode */\n--keycap-text-color-dark: rgb(127, 132, 151);\n--keycap-gradient-dark: linear-gradient(\n  -26.5deg,\n  rgb(38, 39, 43) 0%,\n  rgb(58, 59, 63) 100%\n);\n--keycap-key-shadow-dark: inset 0 -2px 0 0 rgb(28, 29, 33), inset 0 0 1px 1px\n    rgb(48, 49, 53), 0 2px 2px 0 rgba(3, 4, 9, 0.3);\n--keycap-key-pressed-shadow-dark: inset 0 -2px 0 0 rgb(28, 29, 33), inset 0 0\n    1px 1px rgb(48, 49, 53), 0 1px 1px 0 rgba(3, 4, 9, 0.5);\n```\n\nYou can customize these variables in your CSS to match your app's theme.\n\n## Contributing\n\nIf you have any suggestions or improvements, please submit a pull request or open an issue. Contributions are always welcome!\n\n## License\n\nThis project is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburaksakalli%2Fkeycap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburaksakalli%2Fkeycap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburaksakalli%2Fkeycap/lists"}