https://github.com/rescript-react-native/svg
ReScript bindings for react-native-svg
https://github.com/rescript-react-native/svg
react react-native rescript rescript-react rescript-react-native svg
Last synced: 9 months ago
JSON representation
ReScript bindings for react-native-svg
- Host: GitHub
- URL: https://github.com/rescript-react-native/svg
- Owner: rescript-react-native
- License: mit
- Created: 2020-03-06T10:30:12.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-08-31T15:24:20.000Z (over 1 year ago)
- Last Synced: 2025-03-27T03:11:26.168Z (9 months ago)
- Topics: react, react-native, rescript, rescript-react, rescript-react-native, svg
- Language: ReScript
- Homepage:
- Size: 913 KB
- Stars: 16
- Watchers: 2
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `@rescript-react-native/svg`
[](https://github.com/rescript-react-native/svg/actions)
[](https://www.npmjs.com/@rescript-react-native/svg)
[](https://forum.rescript-lang.org/)
[ReScript](https://rescript-lang.org) bindings for
[`react-native-svg`](https://github.com/react-native-community/react-native-svg).
Exposed as `ReactNativeSvg` module.
`@rescript-react-native/svg` X.y.\* means it's compatible with `react-native-svg`
X.y.\*
## Installation
When
[`react-native-svg`](https://github.com/react-native-community/react-native-svg)
is properly installed & configured by following their installation instructions,
you can install the bindings:
```console
npm install @rescript-react-native/svg
# or
yarn add @rescript-react-native/svg
```
`@rescript-react-native/svg` should be added to `bs-dependencies` in your
`bsconfig.json`:
```diff
{
//...
"bs-dependencies": [
"@rescript/react",
"rescript-react-native",
// ...
+ "@rescript-react-native/svg"
],
//...
}
```
## Usage
Supported :
- SvgXml
- SvgCss
- Svg
- Rect
- Circle
- Ellipse
- Line
- Polygon
- Polyline
- Path
- Text
- TextPath
- Tspan
- Use
- G
- Symbol
- Defs
- Image
- ClipPath
- LinearGradient
- Stop
- RadialGradient
- Mask
- Pattern
- Marker
- ForeignObject
See [definition](./src/ReactNativeSvg.res) for more details.
---
## Changelog
Check the [changelog](./CHANGELOG.md) for more informations about recent
releases.
---
## Contribute
Read the
[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)
before contributing.
## Code of Conduct
We want this community to be friendly and respectful to each other. Please read
[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
so that you can understand what actions will and will not be tolerated.