1.0.5 • Published 3 years ago
react-priority-navigation v1.0.5
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
Name | Type | Description | Default |
---|---|---|---|
itemPadding | String | Padding of each children | 'unset' |
minWidth | String | Min width of the nav | '250px' |
offset | Number | Extra width to trigger | 0 |
debounce | Number | Debounce | 0 |
isOpen | Boolean | Dropdown open state | false |
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