• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS like border-radius corners react component

React ios corners

demo - https://pie6k.github.io/react-ios-corners/

Demo gif

Create ios like rounded corners (squircle). Comparsion with regular border radius:

Demo gif

Demo gif

Playing with different 'roundness' setting, you can achieve look similar to iOS home screen app icons etc.

Links

https://en.wikipedia.org/wiki/Squircle

https://medium.com/minimal-notes/rounded-corners-in-the-apple-ecosystem-1b3f45e18fcc (Highly recommending!)

Usage

import { Squircle } from 'react-ios-corners';

function MyComponent() {
  return <Squircle>Hello</Squircle>;
}

Properties

export interface SquircleProps {
  radius?: number | 'auto';
  roundness?: number; // 0-1
}

It also accept any div property and passes it to the holder.

Note: box-shadow will not be visible because under the hood squircle is based on css masks.

More Repositories

1

jquery.initialize

jQuery plugin for dynamically created elements initialization
JavaScript
161
star
2

react-native-dev-menu-on-touch

Open dev menu with 3 fingers touch in react native instead of shake gesture
TypeScript
74
star
3

hooksy

Simple app state management based on react hooks
TypeScript
62
star
4

motionblur

Experiment with motion blur website scrolling
TypeScript
60
star
5

demotime

TypeScript
39
star
6

filterer

TypeScript
24
star
7

use-method

Hook for creating callbacks that behave like class methods - function keeps the same reference during entire component lifecycle and always have access to 'fresh' variables from last render.
TypeScript
19
star
8

theme-composer

TypeScript
19
star
9

parsebuddy

Advanced parser of arbitral input string
TypeScript
18
star
10

react-smart-sticky

SmartSticky is React component for sticky topbar that will hide when scrolling down and show when scrolling up.
JavaScript
14
star
11

fuzzystring

🕵 Simple fuzzy search library written in TypeScript
TypeScript
12
star
12

statek

State management library based on proxies.
TypeScript
9
star
13

react-native-animated-manager

Simple class wrapping react native Animated Value that helps to perform various operations on them
TypeScript
7
star
14

easy-https

Zero config, one step local https server with a custom local domain.
TypeScript
7
star
15

suspensify

Easy way to convert any async function to suspended function
TypeScript
7
star
16

serverless-typescript-starter

Example of serverless lambda with typescript and serverless-offline
JavaScript
7
star
17

react-native-toolbox

This is set of common react-native tools.
TypeScript
3
star
18

use-needed-state

It's like `useState` - but it'll spy what part of the state is actually used during the render and re-render only if needed.
TypeScript
2
star
19

cleanups

Simple, yet powerful utility for managing cleanups in JavaScript.
TypeScript
1
star