1.1.1 • Published 12 months ago

react-native-squircle-layout v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

react-native-squircle-layout

A React Native component that renders a squircle shape. This component allows you to create a squircle shape with a color of your choice and use it as a background for other components.

Installation

npm install react-native-squircle-layout

or

yarn add react-native-squircle-layout

Usage

Import the SquircleView component and use it to wrap your components.

import { SquircleView } from 'react-native-squircle-layout';

function App() {
  return (
    <SquircleView
      cornerRadius={20}
      cornerSmoothing={1}
      color="#3498db"
      width={200}
      height={200}
      style={{ justifyContent: 'center', alignItems: 'center' }}
    >
      {/* Your content here */}
    </SquircleView>
  );
}

export default App;
  • Note: If width and height are not provided, the squircle will dynamically size itself based on its children.

  • Note: You can also set width and height as the color to have a solid squircle shape without children.

Props

Other View Props

All other View props from React Native are supported.

Example

Contributing

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

License

MIT


Made with create-react-native-library

1.1.1

12 months ago

0.1.0

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago