https://github.com/natanfeitosa/rn-wallpapers
A lightweight library for setting wallpapers with React Native
https://github.com/natanfeitosa/rn-wallpapers
react-native reactnative rn-wallpapers wallpaper
Last synced: 5 months ago
JSON representation
A lightweight library for setting wallpapers with React Native
- Host: GitHub
- URL: https://github.com/natanfeitosa/rn-wallpapers
- Owner: natanfeitosa
- License: mit
- Created: 2023-08-04T05:07:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T17:05:16.000Z (over 2 years ago)
- Last Synced: 2025-11-16T22:08:51.251Z (7 months ago)
- Topics: react-native, reactnative, rn-wallpapers, wallpaper
- Language: Java
- Homepage: https://npm.im/rn-wallpapers
- Size: 345 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# rn-wallpapers
A lightweight library for setting wallpapers with React Native
## Installation
```sh
npm install rn-wallpapers
// or with yarn
yarn add rn-wallpapers
```
## Usage
```js
import { setWallpaper, TYPE_SCREEN } from 'rn-wallpapers';
// ...
await setWallpaper(
{
uri: 'https://i0.wp.com/techwek.com/wp-content/uploads/2021/01/wallpaper-gotas-de-chuva.jpg',
headers: {
// your custom headers ...
}
},
TYPE_SCREEN.LOCK // Sets the wallpaper on Lock Screen only
);
await setWallpaper(
{
uri: 'https://i0.wp.com/techwek.com/wp-content/uploads/2021/01/wallpaper-gotas-de-chuva.jpg'
},
TYPE_SCREEN.HOME // (default) Sets the wallpaper on Home Screen only
);
await setWallpaper(
{
uri: 'https://i0.wp.com/techwek.com/wp-content/uploads/2021/01/wallpaper-gotas-de-chuva.jpg'
},
TYPE_SCREEN.BOTH // Sets the wallpaper on both screen
);
```
> If you are using `Expo Go`, you may need to add the `SET_WALLPAPER` permission to your [permissions array](https://docs.expo.dev/versions/latest/config/app/#permissions)
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)