Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-squircle-mask

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-squircle-mask

Squircle masks for React Native

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-squircle-mask

Squircle corners for React Native views

Features

  • Supported on both iOS and Android
  • Works with Expo Managed Workflow (no native code!)
  • Easily implementable with MaskedView

Preview

Installation

This module library is available on the NPM registry. To install, run:

npm i react-native-squircle-mask --save

If you're using Yarn, run:

yarn add react-native-squircle-mask

Additional Comments

You may also want to install @react-native-community/masked-view, see the usage guides for more

Usage

import React from 'react'
import { View } from 'react-native'

import MaskedView from '@react-native-community/masked-view'
import SquircleView from 'react-native-squircle-mask'

function MyComponent() {
  const maskSquircle = <SquircleView style={{ width: 250, height: 250 }} roundedSize={250/2.5} />

  return (
    <MaskedView style={{ flex: 1 }} maskElement={maskSquircle}>
      <View style={{flex: 1, backgroundColor: 'red' }} />
    </MaskedView>
  )
}

Example

See the example/ folder for an example you can run on Expo.

Alternatively, check out the Expo Project here

License

MIT

Keywords

FAQs

Package last updated on 13 Jul 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc