{"_id":"@boindahood/text-truncate-show-more","_rev":"3-c8f1ef6326fb16b6012e540b8aedd273","name":"@boindahood/text-truncate-show-more","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@boindahood/text-truncate-show-more","version":"1.0.0","license":"MIT","_id":"@boindahood/text-truncate-show-more@1.0.0","maintainers":[{"name":"chubo274","email":"chubo274@gmail.com"}],"dist":{"shasum":"0524887495b24c9a9e57511be65387feeaab93f3","tarball":"https://registry.npmjs.org/@boindahood/text-truncate-show-more/-/text-truncate-show-more-1.0.0.tgz","fileCount":8,"integrity":"sha512-kVC5ho9x5Jl42tWHuSIdEmeyn3eZ0CA2o2JXA2ZqtgbeXmIjOfO+kobjT8JmRR0E8f7FLBeimVCCo87qj/TdyA==","signatures":[{"sig":"MEUCIQCtI/1rERz0pL8wyQ3fw4rLjXNdNJS2WpYpgdUHwlMUAgIgKdkE7VR5lT23lre/WHhwgrb4pTymgW6CZzZ6W+066rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8448},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"yarn build"},"_npmUser":{"name":"chubo274","email":"chubo274@gmail.com"},"_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^17.0.0","@types/react-native":"^0.64.0"},"peerDependencies":{"react":">=17.0.0","react-native":">=0.64.0"},"_npmOperationalInternal":{"tmp":"tmp/text-truncate-show-more_1.0.0_1747762311183_0.5610158623187398","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@boindahood/text-truncate-show-more","version":"1.0.2","license":"MIT","_id":"@boindahood/text-truncate-show-more@1.0.2","maintainers":[{"name":"chubo274","email":"chubo274@gmail.com"}],"dist":{"shasum":"3060e2c44c1908ffc72a55e1ace3c78e20ae27ca","tarball":"https://registry.npmjs.org/@boindahood/text-truncate-show-more/-/text-truncate-show-more-1.0.2.tgz","fileCount":8,"integrity":"sha512-YC0LHvmu1CF+jWxphWasQVxefqjgS1sGiyc03u8fS4Xi2kdbN8veTwqsak3OwfoTYmKH18SwbDVoGRa/k58Uxg==","signatures":[{"sig":"MEUCIQCv591A1iqBXtLxOxUqOFUJKngDrOWnCvvy9/JvdNMA5QIgQPLnIuJ5hW3UmF7oGbkZTnXJsaHa7/nXL1MDJQLG15A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13530},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"80e0877c8d401c7e4ef8ea2f0d8f1df9394b679a","scripts":{"build":"tsc","prepublishOnly":"yarn build"},"_npmUser":{"name":"chubo274","email":"chubo274@gmail.com"},"_npmVersion":"10.8.2","description":"","directories":{},"_nodeVersion":"20.18.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@types/react":"^17.0.0","@types/react-native":"^0.64.0"},"peerDependencies":{"react":">=17.0.0","react-native":">=0.64.0"},"_npmOperationalInternal":{"tmp":"tmp/text-truncate-show-more_1.0.2_1747811347302_0.16885809030409527","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@boindahood/text-truncate-show-more","version":"1.0.3","main":"dist/index.js","types":"dist/index.d.ts","keywords":["react-native","text","truncate","show more","show less","text-expand","read more","text-truncate"],"repository":{"type":"git","url":"https://github.com/chubo274/boindahood/tree/react-native/text-truncate-show-more"},"scripts":{"build":"tsc","prepublishOnly":"yarn build","publish":"npm version patch && npm publish"},"peerDependencies":{"react":">=17.0.0","react-native":">=0.64.0"},"devDependencies":{"typescript":"^5.0.0","@types/react":"^17.0.0","@types/react-native":"^0.64.0"},"license":"MIT","publishConfig":{"access":"public"},"description":"A simple React Native component to truncate long text and toggle between \"show more\" / \"show less\".","_id":"@boindahood/text-truncate-show-more@1.0.3","dist":{"shasum":"e4c4998f240a4f1ed314025334dd1e2088cfc279","integrity":"sha512-RHIv066DmxLvcJdd1hXX/2RnkF1BsRhFssd70uobjpKohBhloC8RsqzpgT1/QYXYtJCVFlC0AkgE58NUiWMFqg==","tarball":"https://registry.npmjs.org/@boindahood/text-truncate-show-more/-/text-truncate-show-more-1.0.3.tgz","fileCount":10,"unpackedSize":13989,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGFbB9E7WEXjPkVbmJhTrx3YAKvEEn/34gjOg7exZtpQAiAK/bprJnjK1nT5b6nx9filBSuy4Uj/i+kt+/qgopw4Jw=="}]},"_npmUser":{"name":"chubo274","email":"chubo274@gmail.com"},"directories":{},"maintainers":[{"name":"chubo274","email":"chubo274@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-truncate-show-more_1.0.3_1747812873292_0.37876319236657574"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-20T17:31:51.103Z","modified":"2025-05-21T07:34:33.685Z","1.0.0":"2025-05-20T17:31:51.389Z","1.0.2":"2025-05-21T07:09:07.511Z","1.0.3":"2025-05-21T07:34:33.473Z"},"license":"MIT","maintainers":[{"name":"chubo274","email":"chubo274@gmail.com"}],"readme":"\n# @boindahood/text-truncate-show-more\n\n  \nA simple React Native component to truncate long text and toggle between \"show more\" / \"show less\".\n\n\n## 📽 Demo Preview\n\n![Demo](https://raw.githubusercontent.com/chubo274/boindahood/react-native/text-truncate-show-more/text-truncate-show-more/assets/gif-text-truncate-show-more.gif)\n\n  \n\n## ✨ Features\n\n  \n\n- Truncate multi-line text with \"Show more\" button\n\n- Toggle between expanded/collapsed state\n\n- Fully customizable text and styles\n\n- Automatically recalculate when using multiple languages\n\n- Zero dependencies\n\n  \n\n## 📦 Installation\n\n  \n\n```bash\n\nyarn add @boindahood/text-truncate-show-more\n\n# or\n\nnpm install @boindahood/text-truncate-show-more\n\n```\n\n  \n\n## ⚙️ Usage\n\n  \n\n```tsx\n\nimport { TextShowMore } from  '@boindahood/text-truncate-show-more';\nimport  React  from  'react';\nimport { View } from  'react-native';\n\nexport  default  function  MoreLess() {\nconst  longText  =  'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';\n\nreturn  <View>\n{/* all props is optional, detail api below */}\n<TextShowMore\nnumberOfLines={2}\ntextStyle={{ color:  'black' }}\ntextShowMore={'Show more'}\ntextShowMoreStyle={{ color:  'red' }}\ntextShowLess={'Show less'}\ntextShowLessStyle={{ color:  'blue' }}\n>\n{longText}\n</TextShowMore>\n\n<TextTruncate\nnumberOfLines={2}\nstyle={{ color:  'black' }}\n>\n{longText}\n</TextTruncate>\n</View>\n}\n\n```\n\n  \n\n## 📘 Props\n\n| Prop                | Type                     | Required | Default                  | Description                                                           |\n|---------------------|--------------------------|:--------:|--------------------------|-----------------------------------------------------------------------|\n| `children`          | `string`                 | No       | —                        | The text content to be displayed and truncated.                       |\n| `textStyle`         | `StyleProp<TextStyle>`   | No       | `{ fontWeight: 'bold' }` | Custom style for the main text content.                               |\n| `numberOfLines`     | `number`                 | No       | `undefined`              | Maximum number of lines to display before truncating the text.        |\n| `textShowMore`      | `string`                 | No       | `\"Show more\"`            | Text displayed to expand the content.                                 |\n| `textShowLess`      | `string`                 | No       | `\"Show less\"`            | Text displayed to collapse the content.                               |\n| `textShowMoreStyle` | `StyleProp<TextStyle>`   | No       | `{ fontWeight: 'bold' }` | Custom style for the \"Show More\" text.                                |\n| `textShowLessStyle` | `StyleProp<TextStyle>`   | No       | `{ fontWeight: 'bold' }` | Custom style for the \"Show Less\" text.                                |\n\n  \n\n## 🧪 Example Code\n\n  \n\n[![View examples on Snack](https://img.shields.io/badge/View%20Examples%20on%20Snack-4630EB?style=for-the-badge&logo=expo&logoColor=white)](https://snack.expo.dev/@chubo274/react-native-text-truncate-show-more?platform=ios)\n\n  \n\n","readmeFilename":"README.md","description":"A simple React Native component to truncate long text and toggle between \"show more\" / \"show less\".","keywords":["react-native","text","truncate","show more","show less","text-expand","read more","text-truncate"],"repository":{"type":"git","url":"https://github.com/chubo274/boindahood/tree/react-native/text-truncate-show-more"}}