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 🙏

© 2026 – Pkg Stats / Ryan Hefner

rc-videodscbox

v1.0.0

Published

video preview view

Downloads

1

Readme

rc-videodscbox

online demo

Usage

class Page extends React.Component {
    state = {
        infoType: 'in',
        infoOpenWhenPreview: false,
    }
    render() {
        // use <num>.(image/*) as filename
        var data1 = {
            coverUrl: './resource/res1/cover.jpg',
            resUrl: './resource/res1',
            name: '视频1',
            author: <a href="">作者1</a>,
            D1: '简介:简介简介简介简介简介简介简介'
        }, data2 = {
            coverUrl: './resource/res2/cover.jpg',
            resUrl: './resource/res2',
            name: '视频2',
            author: <a href="">作者2</a>,
            D1: '简介:简介简介简介简介简介简介简介'
        }, state = this.state, props = this.props, dscStyle = {
            float: 'left', margin: '0px 10px 5px 0px'
        };
        return <div style={{padding:'10px 0px'}}>
            <div key={'video'} style={{width: 360, margin: '0px auto'}} className={'clearfix'}>
                <VideoDscBox infoOpenWhenPreview={state.infoOpenWhenPreview} style={dscStyle}
                             infoType={state.infoType}
                             data={data1}></VideoDscBox>
                <VideoDscBox infoOpenWhenPreview={state.infoOpenWhenPreview} style={dscStyle} infoType={state.infoType}
                             data={data2}></VideoDscBox></div>
            <div key={'select'}>
                <label>infoType:</label>
                <Select style={{width:200}} defaultValue={'in'} onChange={(value) => {
                    var infoOpen = !(value == 'in');
                    this.setState({infoType: value, infoOpenWhenPreview: infoOpen})
                }}>
                    <Option value={'in'}>in</Option>
                    <Option value={'bottom'}>bottom</Option>
                    <Option value={'right'}>rightSm</Option>

                </Select>
            </div>
        </div>
    }
}

prop

data

type:
{url?: string,  // link href
name: string,  // view name
coverUrl: string, // cover img url
resUrl: string, // preview dir url
author?: React.ReactNode, //optinal author node
D1?: React.ReactNode, // optional detail node
D2?: React.ReactNode,// optional detail node
D3?: React.ReactNode,// optional detail node
},

suffix

type?: string, // preview file suffix

className

type?: string,

customInfo

type?: () => React.ReactNode,

previewCount

type?: number, // preview count use filename:.(jpg)

style

type?: object,

prefix

type: React.ReactNode,

infoType

type:?: 'in' | 'bottom' | 'right' ,

display

type: object,//infobox position

onMouseOver

type?: (e: React.SyntheticEvent) => void,

onMouseEnter

type?: (e: React.SyntheticEvent) => void,

onMouseLeave

type?: (e: React.SyntheticEvent) => void,

infoOpenWhenPreview

type: boolean,

displayImage

type: boolean,

preview

type: boolean,

previewCount

type: number,