New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-skia-shadow

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-skia-shadow

Android and iOS shadows with React Native Skia.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

React Native Skia Shadow

Android and iOS compatible shadows with React Native Skia.

Report Bug · Request Feature

Table of Contents

About the Project

Take a look at the iOS and Android screenshots below.

iOS (iPhone 15 Pro Max)

React Native Skia Shadow iOS Screenshot

Android (Nexus 5)

React Native Skia Shadow Android Screenshot

Getting Started

Peer Dependencies

@shopify/react-native-skia

React Native CLI
npm install @shopify/react-native-skia
yarn add @shopify/react-native-skia
  • (MacOS only) Install Cocoa packages

    npx pod-install
    
Expo
npx expo install @shopify/react-native-skia

Installation

npm install react-native-skia-shadow
yarn add react-native-skia-shadow

(back to top)

Usage

Wrap the component you want to add a shadow inside a SkiaShadow component.

Props

PropTypeDefault
blurnumber
dxnumber
dynumber
colorColor'black'
borderRadiusnumber0
borderTopLeftRadiusnumberborderRadius
borderTopRightRadiusnumberborderRadius
borderBottomLeftRadiusnumberborderRadius
borderBottomRightRadiusnumberborderRadius

Example

import React from 'react';
import { StyleSheet, View } from 'react-native';
import { SkiaShadow } from 'react-native-skia-shadow';

export const App = () => {
  return (
    <View style={styles.container}>
      <SkiaShadow blur={5} dx={0} dy={0} color="blue" borderRadius={9999}>
        <View style={styles.circle} />
      </SkiaShadow>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  circle: {
    width: 150,
    height: 150,
    borderRadius: 9999,
    backgroundColor: 'red',
  },
});

For usage details, please refer to the src folder of the example app. https://github.com/chsdwn/react-native-skia-shadow/tree/main/example/src

(back to top)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

Keywords

react-native

FAQs

Package last updated on 15 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts