0.10.0 • Published 8 months ago

react-live-island v0.10.0

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

Create now ➫ 🔗 kee.so


react-live-island

by 🐤 kee.so

Dynamic Island 🏝 for ⚛️ React

npm npm npm bundle size GitHub npm type definitions

Install

pnpm add react-live-island
# or
yarn add react-live-island
# or
npm i react-live-island

Usage

import LiveIsland from 'react-live-island';

const Demo = () => {
  return <LiveIsland>{(isSmall) => (isSmall ? 'small' : 'large')}</LiveIsland>;
};

Edit react-live-island

Props

PropTypeDefaultDescription
classNamestring''Class name of the island
topnumber\|string10Top egde of the island
smallClassNamestring''Class name of the small island
smallWidthnumber\|string96Width of the small island
smallHeightnumber\|string30Height of the small island
largeClassNamestring''Class name of the large island
largeWidthnumber\|string400Width of the large island
largeHeightnumber\|string180Height of the large island
largeRadiusnumber\|string36Border radius of the large island
wrapperClassNamestring''Class name of the whole container
triggerType'click'\|'hover''click'Trigger mode for open
initialAnimationbooleanfalseWhether show animiation on enter
onChange(isSmall: boolean) => void-Call when the island open & close
children(isSmall: boolean) => ReactNode-Render funtion to define the island's content

License

MIT License (c) nanxiaobei

0.10.0

8 months ago

0.9.0

8 months ago

0.8.0

8 months ago

0.7.0

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.0

8 months ago

0.3.0

8 months ago

0.2.0

8 months ago

0.1.0

8 months ago

0.0.1

8 months ago