npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rat-dropdown

v0.1.28

Published

rat-dropdown component for Rat.

Downloads

27

Readme

rat-dropdown

组件介绍

  • category: Components
  • chinese: 下拉菜单
  • type: 弹层

开发指南

何时使用

当页面上的操作命令过多时,用此组件可以收纳操作元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。

API

Dropdown

继承 Popup 的 API,除非特别说明

| 参数 | 说明 | 类型 | 默认值 | | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------ | | children | 弹层内容 | ReactNode | - | | visible | 弹层当前是否显示 | Boolean | - | | defaultVisible | 弹层默认是否显示 | Boolean | false | | onVisibleChange | 弹层显示或隐藏时触发的回调函数签名:Function(visible: Boolean, type: String, e: Object) => void参数:visible: {Boolean} 弹层是否显示type: {String} 触发弹层显示或隐藏的来源e: {Object} DOM事件 | Function | func.noop | | trigger | 触发弹层显示或者隐藏的元素 | ReactNode | - | | triggerType | 触发弹层显示或隐藏的操作类型可选值:'hover', 'click', 'focus' | Enum | 'hover' | | disabled | 设置此属性,弹层无法显示或隐藏 | Boolean | false | | align | 弹层相对于触发元素的定位, 详见 Overlay 的定位部分 | String | 'tl bl' | | offset | 弹层相对于触发元素定位的微调 | Array | [0, 0] | | delay | 弹层显示或隐藏的延时时间(以毫秒为单位),在 triggerType 被设置为 hover 时生效 | Number | 200 | | autoFocus | 弹层打开时是否让其中的元素自动获取焦点 | Boolean | true | | hasMask | 是否显示遮罩 | Boolean | false | | cache | 隐藏时是否保留子节点 | Boolean | false | | animation | 配置动画的播放方式,支持 { in: 'enter-class', out: 'leave-class' } 的对象参数,如果设置为 false,则不播放动画 | Object/Boolean | { in: 'expandInDown', out: 'expandOutUp' } |