1.0.11 • Published 2 years ago

@actav/floating-icon-navigation v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Floating-icon-navigation

npm GitHub Workflow Status (with event) GitHub Release Date - Published_At NPM

Live Demo

Ex)

Screen Recording 2023-07-15 at 1 21 05 AM

Installation

yarn add @actav/floating-icon-navigation

or

npm install @actav/floating-icon-navigation

Usage

Provider

Wrap your App with Fin Provider

// ... some imports
import { FinProvider } from '@actav/floating-icon-navigation';

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <FinProvider>
      <App />
    </FinProvider>
  </React.StrictMode>,
);

Components

Fins, Fin: Content Generator

// ... some imports
import { Fins, Fin } from '@actav/floating-icon-navigation';

function Generator() {
  // There should be at least one Fin component with index
  return (
    <Fins>
      <Fin index path='main' activeColor='#4263EB' icon={<AiFillHome />}>
        Home
      </Fin>
      <Fin path='git' icon={<AiFillGithub />}>
        Visit{' '}
        <a href='https://github.com/ActaV-N/floating-icon-navigation' target='_blank' rel='noopener'>
          repository
        </a>
      </Fin>
      <Fin path='info' activeColor='#40C057' icon={<AiFillExclamationCircle />}>
        This package is created by Lee
      </Fin>
    </Fins>
  );
}

export default Generator;

Abovce code will make this:

FinReceiver: Content Receiver

// ... some imports
import { FinReceiver } from '@actav/floating-icon-navigation';

function Receiver() {
  return (
    <div>
      <FinReceiver />
      <Generator />
    </div>
  );
}

export default Receiver;

If you add receiver, result will be like this:

Props

Fin

propsdescriptiontype
iconicon component, representing navigation buttonReact.ReactNode
activeColorcss color string like hex, '#fff' or RGBA, 'rgba(255, 255, 255, 1)'. This activeColor will be applied when the fin is activated.string?
indexDefault fin. It's optional property but at least one should be a indexbolean?
pathpath for navigation. It's like ID.string
childrenchildren of will be shown in Receiver.React.ReactNode
1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago