1.0.5 • Published 3 years ago

react-priority-navigation v1.0.5

Weekly downloads
166
License
MIT
Repository
github
Last release
3 years ago

PriorityNav for React

Example

import PriorityNav, { ToggleButton } from 'react-priority-navigation';

<PriorityNav
  dropdown={({ dropdownItems, buttonProps }) => (
    <>
      <ToggleButton {...buttonProps.bind} />
      <PopupContent>
        {dropdownItems.map((item, i) => (
          <CustomItem key={i} {...item.props} />
        ))}
      </PopupContent>
    </>
  )}
>
  <button>I am a Button ⏹ ️</button>
  <a>This is Link 🔗</a>
  <div>I am a Div!</div>
  <div>Looooong Div🐢🐢🐢🐢</div>
  <div>🉑</div>
</PriorityNav>;

Props

NameTypeDescriptionDefault
itemPaddingStringPadding of each children'unset'
minWidthStringMin width of the nav'250px'
offsetNumberExtra width to trigger0
debounceNumberDebounce0
isOpenBooleanDropdown open statefalse

ToggleButton

  children?: React.ReactNode
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.8-rc2

6 years ago

0.0.8-rc1

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago