All Projects → timc1 → postel

timc1 / postel

Licence: MIT License
tiny react library for building tooltips, flyovers, menus and more

Programming Languages

typescript
32286 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to postel

V Tooltip
💬 Easy tooltips, popovers, dropdown for Vue
Stars: ✭ 2,109 (+2912.86%)
Mutual labels:  tooltip, menu
Tippyjs
Tooltip, popover, dropdown, and menu library
Stars: ✭ 9,433 (+13375.71%)
Mutual labels:  tooltip, menu
Tippyjs React
React component for Tippy.js (official)
Stars: ✭ 1,081 (+1444.29%)
Mutual labels:  tooltip, menu
Vue Ui For Pc
基于Vue2.x的一套PC端UI组件,包括了Carousel 跑马灯、Cascader 级联、Checkbox 多选框、Collapse 折叠面板、DatePicker 日期选择、Dialog 对话框、Form 表单、Input 输入框、InputNumber 数字输入框、Layer 弹窗层、Loading 加载、Menu 菜单、Page 分页、Progress 进度条、Radio 单选框、SelectDropDown 仿select、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 文字提示、BackTop 返回顶部、steps 步骤条、Transfer 穿梭框、Tree 树形、Upload 文件上传、Lazy 图片懒加载、Loading 加载、Pagination 分页等等
Stars: ✭ 156 (+122.86%)
Mutual labels:  tooltip, menu
menu
Simplistic, effortless menu building API originally built for Laravel use, now a seamlessly independent package.
Stars: ✭ 14 (-80%)
Mutual labels:  menu
Nova-Menu-Builder
A Menu Builder for Laravel Nova
Stars: ✭ 63 (-10%)
Mutual labels:  menu
SpikeTip
Create effortless tooltips that breathe CSS! No Javascript. Just the good old CSS.
Stars: ✭ 26 (-62.86%)
Mutual labels:  tooltip
lazeemenu
Multi-level sidebar menu - JQuery plugin
Stars: ✭ 40 (-42.86%)
Mutual labels:  menu
WBChainMenu
This will show horizontal menu to a UITableViewCell with chain animation
Stars: ✭ 28 (-60%)
Mutual labels:  menu
menu-control
🍔 Menu and breadcrumb components for Nette framework (@nette)
Stars: ✭ 26 (-62.86%)
Mutual labels:  menu
hexo-tag-hint
A Hexo tag plugin to display text hint/spoiler tooltip.
Stars: ✭ 26 (-62.86%)
Mutual labels:  tooltip
TheBashMenu
A useful bash script allowing you to easily create your own menu, which uses the directional keys! Quickly add your title, options and commands and you're good to go!
Stars: ✭ 52 (-25.71%)
Mutual labels:  menu
menuffy
menuffy is a status menu application that allows you to open the menu of the current application at hand.
Stars: ✭ 76 (+8.57%)
Mutual labels:  menu
PopOverAlert
PopOverAlert is a PopOver style alert view.
Stars: ✭ 56 (-20%)
Mutual labels:  menu
direct menu
Nextcloud/OwnCloud app to provide easy access to all apps in the header
Stars: ✭ 16 (-77.14%)
Mutual labels:  menu
jquery-accessible-dialog-tooltip-aria
jQuery simple and accessible dialog tooltip window, using ARIA
Stars: ✭ 17 (-75.71%)
Mutual labels:  tooltip
LavaFab
💧 Android floating action button menu with "lava" animation
Stars: ✭ 51 (-27.14%)
Mutual labels:  menu
ak-vue3
组件库包含了 AutoForm 自动表单、BackTop 返回顶部、Breadcrumb 面包屑、 Button 按钮、Cascader 级联选择器、Checkbox 多选框、Collapse 折叠面板、ColorPicker 颜色选择器、DataPicker 时间选择器、Dialog 弹层对话框、Alert 弹框、Echarts 图形图表、Form 表单、Input 输入框、Lazy 图片延时加载、Loading 加载等待、Menu 菜单、Pagination 分页、Progress 进度条、Radio 单选框、Select 选择器、Steps 步骤条、Swiper 图片轮播、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 提示、Tr…
Stars: ✭ 24 (-65.71%)
Mutual labels:  tooltip
simple-sidenav
Simple, easily customizable, animated menu.
Stars: ✭ 40 (-42.86%)
Mutual labels:  menu
SwiftUI-Tooltip
Easy Tooltip for your SwiftUI Project
Stars: ✭ 130 (+85.71%)
Mutual labels:  tooltip

Postel 🌑

npm version code style: prettier Built with Typescript badge

Postel is a single component that you can easily extend into customized tooltips, dropdowns, flyovers – any type of UI which would make sense to render outside of your regular React root node, floating above all other content.

Postel is built on the idea of opening a generic set of props that allow wide customizability. With that, we attempt to keep the API as simple as possible.


Tooltip

Screen Shot 2020-07-04 at 6 01 50 PM

Custom content

Screen Shot 2020-07-04 at 6 01 50 PM

Usage

The simplest usage of Postel is building something like a tooltip – just wrap it around the component that you want to trigger:

<Postel
  title="Toggle menu"
  content={
    <div className="tooltip">
      Tooltip content
    </div>
  }
  caret={
    <div className="caret" />
  }
}}>
  <button className="button">Trigger</button>
</Postel>

Props

children: React.ReactNode

A valid React child that Postel will attach listeners to.

title: string

A string to describe the purpose of what will be shown or hidden.

placement?: "auto" | "top" | "top-start" | "top-end" | "left" | "right" | "bottom" | "bottom-start" | "bottom-end"

The position that you want Postel to render your content relative to the children.

preferredAutoPlacement?: "top" | "top-start" | "top-end" | "left" | "right" | "bottom" | "bottom-start" | "bottom-end"

If your placement is set to auto, this is the preferred position that you would like auto to default to.

trigger?: "hover" | "click" | "mousedown"

The type of action you want to apply to the children that will show your content.

triggerDelay?: number

The time in milliseconds that you want to delay showing the content after triggering to show.

hideTrigger?: "click" | "mouseleave"

The type of action you want to signal that the content should hide.

hideDelay?: number

The time in milliseconds that you want to delay hiding the content after triggering to hide.

transitionOutMs?: number

Important for adding leave animations – the amount of time in milliseconds you want your content to animate out before unmounting.

showTransparentUnderlay?: boolean

Add this if you want a hidden transparent underlay that will cover the entire screen to prevent clicks on UI outside of your content.

verticalOffset?: number

Add this if you want to vertically offset the content by n pxs.

horizontalOffset?: number

Add this if you want to horizontally offset the content by n pxs.

Contributing

Contributions are welcome! For requests or bugs, please create an issue here.

Installation

Postel uses yarn to manage dependencies. To install, simply run:

git clone [email protected]:timc1/postel.git

cd postel

yarn install

yarn start

Navigate to localhost:8080 and you should see a hot reloading interface to run the code against.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].