zeego

Menus for React (Native) done right.

MIT License

Downloads
57.1K
Stars
1.3K
Committers
16

Bot releases are hidden (Show)

zeego - 1.10 Latest Release

Published by nandorojo 7 months ago

This version fixes support for checkboxes not showing on Android, closing #45

What's Changed

New Contributors

Full Changelog: https://github.com/nandorojo/zeego/compare/v1.9...v1.10.0

zeego - 1.9

Published by nandorojo 8 months ago

New Features 🛫

shouldDismissMenuOnSelect (iOS, Web)

You can now pass shouldDismissMenuOnSelect to <ContextMenu.Item /> to disable closing a menu.

<ContextMenu.Item shouldDismissMenuOnSelect={false} />

This works on the CheckboxItem and Item for both ContextMenu and DropdownMenu

(TODO: add to docs)

Full Changelog: https://github.com/nandorojo/zeego/compare/v1.8.1...v1.9

zeego - 1.8.1

Published by nandorojo 8 months ago

Fixes

In order to support horizontal groups, you can now pass an empty string to textValue in your nested item props:

  <Menu.Group horizontal>
    <Menu.Item key="item" textValue="">
      <Menu.ItemIcon ios={{ name: 'your-icon-here' }} />
    </Menu.Item>
  </Menu.Group>

This lets you use icons only.

zeego - 1.8

Published by nandorojo 8 months ago

New Features 🍕

Horizontal groups (iOS)

On iOS, you can use the horizontal prop render items like so:

<DropdownMenu.Group horizontal> 
  ...
</DropdownMenu.Group>

Same goes for ContextMenu

Group labels (iOS, Web)

Groups can now have labels!

To add a title to the group, pass a Label component inside of it:

<DropdownMenu.Group>
  <DropdownMenu.Label>menuTitle</DropdownMenu.Label>
</DropdownMenu.Group>

New SF Symbols

Upgraded to SF Symbols v2!

image

See the docs here: https://github.com/nandorojo/sf-symbols-typescript/releases/tag/v2

What's Changed

New Contributors

Full Changelog: https://github.com/nandorojo/zeego/compare/v1.7.1...v1.8.0

zeego - 1.7.3

Published by nandorojo 8 months ago

Fixes

  • Fix Android callback not existing when onSelect / onValueChange isn't added to an item
  • Prevent long press gestures from propagating on iOS
zeego - 1.7.1

Published by nandorojo about 1 year ago

Fix: Add asChild support to ContextMenu.Trigger on Web.

zeego - 1.7.0 🎉

Published by nandorojo about 1 year ago

No breaking changes in this release.

New Features

Remote Image for iOS

The following is now supported on iOS:

<DropdownMenu.ItemImage 
  source={{ uri: 'https://your-image-url' }}
  lazy={false} // defaults to true
  style={{ 
    // a special style object for iOS
    cornerRadius?: number
    renderingMode?: 'automatic' | 'alwaysOriginal' | 'alwaysTemplate'
    tint?: string | { dark: string, light: string }
  }}
/>

asChild for Trigger

You can now pass asChild to DropdownMenu.Trigger/ContextMenu.Trigger to forward props down to the immediate child.

Bug Fixes

  • onOpenChange was previously not doing anything on Web for ContextMenu.Root. This is now fixed.
zeego - 1.5.2

Published by nandorojo over 1 year ago

zeego - 1.5.0

Published by nandorojo over 1 year ago

New Features

Trigger now accepts an action prop, which lets you control whether the menu should open on press or longPress.

<DropdownMenu.Trigger action="longPress">
  <Text>Open</Text>
</DropdownMenu.Trigger>

For ContextMenu, this defaults to longPress. For DropdownMenu, it defaults to press.

zeego - 1.4.2

Published by nandorojo over 1 year ago

Fixes

  • Fix value boolean prop on Web for CheckboxItem on both DropdownMenu and ContextMenu.
zeego - 1.4.0

Published by nandorojo over 1 year ago

New Features

ItemTitle now accepts custom children

The ItemTitle now accepts a text element as the child, in addition to a string. To use this behavior, you must pass a textValue prop to the parent Item.

<DropdownMenu.Item textValue="Cars" key="cars">
  <DropdownMenu.ItemTitle>
     <Text>
       Cars
     </Text>
   <DropdownMenu.ItemTitle>
</DropdownMenu.Item>

This is useful for rendering custom text nodes on Web. The textValue prop supplied to Item will get used on iOS and Android as the title. On Web, it will be used for typeahead.

The previous behavior still works too, wherein you simply pass a string to ItemTitle:

<DropdownMenu.Item key="cars">
  <DropdownMenu.ItemTitle>
    Cars
  </DropdownMenu.ItemTitle>
</DropdownMenu.Item>

The textValue prop is optional in this case. However, you can still set it if you'd like. If you do, it will override the title on iOS and Android. It will also set the label for typeahead purposes on Web.

<DropdownMenu.Item textValue="Red Cars" key="cars">
  <DropdownMenu.ItemTitle>
    Cars
  </DropdownMenu.ItemTitle>
</DropdownMenu.Item>
zeego - 1.3.0

Published by nandorojo over 1 year ago

New Features

You can now pass a boolean to the value prop of DropdownMenu.CheckboxItem and ConextMenu.CheckboxItem, in addition to an on or off string. onValueChange will still use the strings under the hood for the callbacks.

zeego - 1.2.0

Published by nandorojo over 1 year ago

New Features

  • Added Sub menu support to Android via #27
  • Added onOpenWillChange to iOS & Web via #38 #25
zeego - 1.1.0 SF Symbols

Published by nandorojo over 1 year ago

This version adds auto complete for SF Symbols.

image

I made this library to support it: https://github.com/nandorojo/sf-symbols-typescript

zeego - v1: ContextMenu, Sub, 🎉

Published by nandorojo about 2 years ago

First off, thank you all for trying this out so far.

v1 is finally here!

yarn add zeego

Breaking changes

  • menuify will get renamed to create to potentially accommodate future components, such as Popover / Tooltip 🫣

Submenu change (BREAKING)

Zeego 1.0 Upgrades to v2 of Radix's Dropdown and Context Menus. Both of these have a new API for creating submenus. Rather than using a nested Root with TriggerItem, it's now a Sub with a SubTrigger:

<DropdownMenu.Sub>
  <DropdownMenu.SubTrigger />
  <DropdownMenu.SubContent />
</DropdownMenu.Sub>

This is a breaking change and will be supported in Zeego v1 without backwards compatibility. If you aren't using submenus, this doesn't pertain to you.

An easy way to find if this affects you is to search TriggerItem in your code.

zeego - 0.5.0

Published by nandorojo about 2 years ago

I'm super excited about this release.

I'm still considering Zeego "pre-release" since there are no docs quite yet. However, once I get a docs site and release a 1.0, I'll do a more thorough walk-through of each feature.

This release has zero breaking changes and does not require new native code. It is backwards compatible with previous versions of Zeego 🤯

👻 New Features

<ContextMenu />

You'll have to reference the example app for now...but it's pretty epic. The Preview feature on iOS is especially cool for creating incredible context menu experiences...

See #10 for more.

ItemImage

You can now use <DropdownMenu.ItemImage /> and the images will work on iOS for both dropdown and context menus.

Simply pass require('./my-image') to the source prop of your ItemImage.

This closes #7 via #10.

Additional props

Added onOpenChange prop, closing #14 via #10.

zeego - 0.4.0

Published by nandorojo over 2 years ago

Thanks to @intergalacticspacehighway's PR at #6, we now have a native menu for Android!

Also closes #5.

This will make the ContextMenu component much easier to build. For now, this only exists for DropdownMenu, but ContextMenu should be coming soon...