{"id":26045840,"url":"https://github.com/notfounds/react-segmenter","last_synced_at":"2026-02-26T15:33:26.644Z","repository":{"id":152511843,"uuid":"625993900","full_name":"NotFounds/react-segmenter","owner":"NotFounds","description":"A React component that utilizes Intl.Segmenter to control line breaks in Japanese text.","archived":false,"fork":false,"pushed_at":"2025-03-27T19:12:17.000Z","size":789,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T20:47:07.005Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotFounds.png","metadata":{"files":{"readme":"README-ja.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-04-10T15:11:59.000Z","updated_at":"2024-07-21T14:25:53.000Z","dependencies_parsed_at":"2024-05-21T20:02:43.021Z","dependency_job_id":"7cb1fbe8-6d4c-44a9-8cdf-d1a56d509784","html_url":"https://github.com/NotFounds/react-segmenter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Freact-segmenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Freact-segmenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Freact-segmenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotFounds%2Freact-segmenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotFounds","download_url":"https://codeload.github.com/NotFounds/react-segmenter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248215192,"owners_count":21066619,"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":[],"created_at":"2025-03-07T20:49:36.927Z","updated_at":"2026-02-26T15:33:26.613Z","avatar_url":"https://github.com/NotFounds.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-segmenter\n\n[![NPM](https://img.shields.io/npm/v/react-segmenter.svg)](https://www.npmjs.com/package/react-segmenter)\n\n[README.md - English](/README.md)\n\n---\n\n**react-segmenter** は、ブラウザ上で和文の改行をより読みやすくするための React コンポーネントを提供するライブラリです。ECMA402 の [`Intl.Segmenter`](https://github.com/tc39/proposal-intl-segmenter) を使用して和文を適切に分かち書きし、ブラウザに改行可能箇所を教えることで快適な読みやすさを実現します。特に、モバイル端末のような画面幅が狭い場合やレスポンシブUIを作る上で有効です。\n\n\n## Installation\n\n```bash\nnpm install react-segmenter\n\n# or\n\nyarn add react-segmenter\n```\n\n\n## Usage\n\n```tsx\nimport React from 'react';\nimport { TextSegmenter } from 'react-segmenter';\n\nconst App = () =\u003e {\n  return (\n    \u003cTextSegmenter\u003eここに改行されるべき日本語の文章を入れてください。\u003c/TextSegmenter\u003e\n  );\n};\n```\n\n\n## Notes\n\n- このライブラリは、主に日本語の改行位置制御を目的としています。英語の場合は、CSS を変更し、ブラウザに任せることを推奨します。\n- Intl.Segmenter の実装は、処理系によって異なる可能性があるため、異なる分割結果が得られることがあります。この点に注意して使用してください。\n- ブラウザによっては、Intl.Segmenter がサポートされていない場合があります。その場合は、当ライブラリを使用する際に問題が発生する可能性があるため注意が必要です。\n\n\n## License\n\nMIT © [NotFounds (Iori IKEDA)](https://github.com/NotFounds)\n\n\n## References\n\n[Intl.Segmenter で和文の改行をいい感じにしてみる](https://zenn.dev/notfounds/articles/58c465d4029dc1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotfounds%2Freact-segmenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotfounds%2Freact-segmenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotfounds%2Freact-segmenter/lists"}