{"id":50512773,"url":"https://github.com/selfishprimate/yojimbo","last_synced_at":"2026-06-02T21:31:12.848Z","repository":{"id":349216419,"uuid":"1201284967","full_name":"selfishprimate/yojimbo","owner":"selfishprimate","description":"Animated border beam effect for React. A glowing light trail that travels along the border of any element. Named after the samurai — the beam cuts along edges like a blade catching light.","archived":false,"fork":false,"pushed_at":"2026-04-04T19:36:05.000Z","size":2258,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T21:53:31.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/selfishprimate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2026-04-04T13:19:21.000Z","updated_at":"2026-04-04T19:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/selfishprimate/yojimbo","commit_stats":null,"previous_names":["selfishprimate/yojimbo"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/selfishprimate/yojimbo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfishprimate%2Fyojimbo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfishprimate%2Fyojimbo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfishprimate%2Fyojimbo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfishprimate%2Fyojimbo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selfishprimate","download_url":"https://codeload.github.com/selfishprimate/yojimbo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selfishprimate%2Fyojimbo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33838215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"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":[],"created_at":"2026-06-02T21:31:08.662Z","updated_at":"2026-06-02T21:31:12.796Z","avatar_url":"https://github.com/selfishprimate.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Yojimbo](https://raw.githubusercontent.com/selfishprimate/yojimbo/main/yojimbo-featured-image.jpg)\n\n\u003cp\u003eAnimated border beam effect for React. A glowing light trail that travels along the border of any element.\u003c/p\u003e\n\nNamed after Akira Kurosawa's epic 1961 samurai film *Yojimbo*, starring the legendary Toshiro Mifune. The effect is inspired by the gleam of a samurai sword — a sharp, luminous edge that catches the light as it moves.\n\n## Installation\n\n```bash\nnpm install yojimbo\n```\n\n## Usage\n\nDrop the `\u003cYojimbo /\u003e` component inside any element with `position: relative` and a `border-radius`. No CSS import needed — keyframes are injected automatically.\n\n```tsx\nimport { Yojimbo } from \"yojimbo\";\n\nfunction Card() {\n  return (\n    \u003cdiv className=\"relative rounded-2xl border border-gray-800 bg-gray-900 p-6\"\u003e\n      \u003cYojimbo /\u003e\n      \u003ch2\u003eYour content here\u003c/h2\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n### Custom colors\n\n```tsx\n\u003cYojimbo colorFrom=\"#3B82F6\" colorTo=\"#8B5CF6\" /\u003e\n```\n\n### Single beam, slower\n\n```tsx\n\u003cYojimbo beams={1} speed={30} /\u003e\n```\n\n### Counter-clockwise with larger glow\n\n```tsx\n\u003cYojimbo direction=\"counterclockwise\" glowBlur={40} glowOpacity={0.9} /\u003e\n```\n\n### Custom blob sizes\n\n```tsx\n\u003cYojimbo colorFrom=\"#FF6B6B\" colorTo=\"#4ECDC4\" colorFromSize={120} colorToSize={60} /\u003e\n```\n\n### No outer glow\n\n```tsx\n\u003cYojimbo glow={false} /\u003e\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `colorFrom` | `string` | `\"#3B82F6\"` | Leading edge color of the beam. Accepts any CSS color value (hex, rgb, rgba, hsl). |\n| `colorTo` | `string` | `\"#8B5CF6\"` | Trailing edge color of the beam. Accepts any CSS color value. |\n| `size` | `number` | `250` | Overall beam size in pixels. |\n| `colorFromSize` | `number` | `size / 3` | Size of the leading color blob in pixels. |\n| `colorToSize` | `number` | `size / 3` | Size of the trailing color blob in pixels. |\n| `speed` | `number` | `20` | Duration of a full loop in seconds. Higher = slower. |\n| `thickness` | `number` | `1` | Visible border thickness in pixels. |\n| `blur` | `number` | `12` | Blur amount for the beam in pixels. |\n| `glowBlur` | `number` | `30` | Blur amount for the outer glow in pixels. |\n| `glowOpacity` | `number` | `0.7` | Opacity of the outer glow (0 to 1). |\n| `glow` | `boolean` | `true` | Whether to show the outer glow effect. |\n| `beams` | `1 \\| 2` | `2` | Number of beams. Two beams are positioned on opposite sides. |\n| `direction` | `\"clockwise\" \\| \"counterclockwise\"` | `\"clockwise\"` | Direction of beam movement. |\n| `className` | `string` | — | Additional CSS class name. |\n\n## How it works\n\n1. A frame div is positioned over the parent element with `overflow: hidden`\n2. CSS `mask: content-box exclude` cuts out the interior, leaving only a thin border strip visible\n3. Circular gradient blobs travel along the border using `offset-path: border-box`\n4. Two blobs per beam (leading `colorFrom` + trailing `colorTo`) create the gradient trail\n5. Optional outer glow orbs follow the same path with a larger blur for ambient light\n\n## Requirements\n\n- React 18+\n- Works with Next.js (App Router \u0026 Pages Router), Vite, CRA, and any React setup\n- The parent element must have `position: relative` and a `border-radius`\n\n## Browser support\n\nUses CSS `offset-path: border-box` which is supported in all modern browsers (Chrome 116+, Firefox 125+, Safari 18+).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfishprimate%2Fyojimbo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselfishprimate%2Fyojimbo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselfishprimate%2Fyojimbo/lists"}