{"id":13400684,"url":"https://github.com/Metroxe/react-border-wrapper","last_synced_at":"2025-03-14T06:31:50.426Z","repository":{"id":34301314,"uuid":"175912899","full_name":"Metroxe/react-border-wrapper","owner":"Metroxe","description":"A wrapper for placing elements along div borders.","archived":false,"fork":false,"pushed_at":"2022-12-09T16:08:05.000Z","size":2144,"stargazers_count":166,"open_issues_count":37,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-03T06:16:22.879Z","etag":null,"topics":["border","border-color","border-style","border-wrapper","browser","div","html5","javascript","javascript-library","jsx","npm","props","react","react-component","react-components","react-hooks","reactjs","rollup","tsx","typescript"],"latest_commit_sha":null,"homepage":"https://metroxe.github.io/react-border-wrapper/","language":"JavaScript","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/Metroxe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["metroxe"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-03-16T01:39:34.000Z","updated_at":"2024-11-30T05:32:27.000Z","dependencies_parsed_at":"2023-01-15T06:15:44.823Z","dependency_job_id":null,"html_url":"https://github.com/Metroxe/react-border-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metroxe%2Freact-border-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metroxe%2Freact-border-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metroxe%2Freact-border-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Metroxe%2Freact-border-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Metroxe","download_url":"https://codeload.github.com/Metroxe/react-border-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243352031,"owners_count":20276914,"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":["border","border-color","border-style","border-wrapper","browser","div","html5","javascript","javascript-library","jsx","npm","props","react","react-component","react-components","react-hooks","reactjs","rollup","tsx","typescript"],"created_at":"2024-07-30T19:00:54.590Z","updated_at":"2025-03-14T06:31:50.415Z","avatar_url":"https://github.com/Metroxe.png","language":"JavaScript","readme":"[![React Border Wrapper Logo](https://metroxe.github.io/react-border-wrapper/react_border_wrapper_logo.png)](https://metroxe.github.io/react-border-wrapper/)\n\n[![NPM](https://img.shields.io/npm/v/react-border-wrapper.svg)](https://www.npmjs.com/package/react-border-wrapper)\n[![NPM](https://img.shields.io/npm/dt/react-border-wrapper.svg)](https://www.npmjs.com/package/react-border-wrapper)\n[![Github Issues](https://img.shields.io/github/issues/metroxe/react-border-wrapper.svg)](https://github.com/Metroxe/react-border-wrapper/issues)\n\n### [Test in Browser](https://metroxe.github.io/react-border-wrapper/)\n\n\n![Example](https://metroxe.github.io/react-border-wrapper/react_border_wrapper_example.png)\n\n## Installation\n\n### npm\n```bash\nnpm install react-border-wrapper\n```\n\n### yarn\n```bash\nyarn add react-border-wrapper\n```\n\n## Usage\n\nUse the border wrapper in the same way you would use a `\u003cdiv\u003e`.\n\n```tsx\nimport * as React from 'react'\nimport BorderWrapper from 'react-border-wrapper'\n\nclass Example extends React.Component {\n  render () {\n    return (\n      \u003cBorderWrapper\u003e\n      \t// Content\n      \u003c/BorderWrapper\u003e\n    )\n  }\n}\n```\n\n## Props\n\n| Prop | Type | Description |\n| --- | :---: | --- |\n| `innerPadding` | `string` `number` | Padding around the children on each edge.\n| `borderWidth` | `string` `number` | Width of the border.\n| `borderRadius` | `string` `number` | Radius of each corner. This radius is added on top of the inner padding. Thus, a large radius will create a large distance between the top and bottom borders.\n| `borderColour` | `string` | CSS compatible string for the border colour\n| `borderType` | `string` | CSS compatible `LineStyle` string to change the border drawing style\n| `topElement` `rightElement` `bottomElement` `leftElement` | `Element` | JSX Element to be rendered at the specified side. If an element is not specified then all prop values for that side will be ignored.\n| `topPosition` `rightPosition` `leftPosition` `rightPosition` | `number` | A number between `0` and `1` to indicate a precentage (`0%` to `100%`) of where the component will be placed along the sides. Values greater than `1` or less than `0` will be at `1` and `0` respectively.\n| `topOffset` `rightOffset` `leftOffset` `rightOffset` | `string` `number` | Offset the component on the given side by this value. Use this to help center or position each component to your desired location.\n| `topGap` `rightGap` `bottomGap` `leftGap` | `string` `number` | Distance between the border and the position of the component to be rendered. \n\n## Playground\nUse the following link to play around with the props and find a proper style. It is highly encouraged to export the props and either [report an issue](https://github.com/Metroxe/react-border-wrapper/issues/new?assignees=\u0026labels=bug\u0026template=bug-report.md\u0026title=) with them or [submit them as a style](https://github.com/Metroxe/react-border-wrapper/issues/new?assignees=\u0026labels=new+style\u0026template=new-style.md\u0026title=) to be used by other users.\n\n[https://metroxe.github.io/react-border-wrapper/](https://metroxe.github.io/react-border-wrapper/)\n\n## License\n\nMIT © [Christopher Powroznik](https://github.com/Metroxe)\n","funding_links":["https://github.com/sponsors/metroxe"],"categories":["Uncategorized","React [🔝](#readme)"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMetroxe%2Freact-border-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMetroxe%2Freact-border-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMetroxe%2Freact-border-wrapper/lists"}