0.0.8 • Published 7 months ago

react-live-island-xdz v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
7 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.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago