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

@suyongs/solid-utility

v0.4.3

Published

Utilities for SolidJS

Downloads

5,543

Readme

solid-utility

Utility component, hooks or anything else for Solid JS

Installation

  • pnpm
pnpm add @suyongs/solid-utility
  • npm
npm install --save @suyongs/solid-utility
  • yarn
yarn add @suyongs/solid-utility

API

Transition

  • Transition: Vue3 like Transition component
    • name: [string], name of transition
    • appear: [boolean], whether transition should be applied on initial render, default is false
    • mode: in-out out-in, default is in-out
    • enterFromClass: [string], class name of enter from, default is enter-from
    • enterActiveClass: [string], class name of enter active, default is enter-active
    • enterToClass: [string], class name of enter to, default is enter-to
    • leaveFromClass: [string], class name of leave from, default is leave-from
    • leaveActiveClass: [string], class name of leave active, default is leave-active
    • leaveToClass: [string], class name of leave to, default is leave-to
    • onBeforeEnter: [(el: HTMLElement) => void], callback before enter
    • onEnter: [(el: HTMLElement) => void], callback when enter
    • onAfterEnter: [(el: HTMLElement) => void], callback after enter
    • onBeforeLeave: [(el: HTMLElement) => void], callback before leave
    • onLeave: [(el: HTMLElement) => void], callback when leave
    • onAfterLeave: [(el: HTMLElement) => void], callback after leave
import { Transition } from '@suyongs/solid-utility';

const Component = () => {
  const [show, setShow] = createSignal(true);

  return (
    <Transition name={'fade'}>
      <Show when={show()}>
        <div>hello world</div>
      </Show>
    </Transition>
  )
};

Marquee

  • Marquee: alternative for marquee tag
    • Normal Property
      • speed: [number], move speed of marquee. pixel per seconds, default is 70
      • gap: [number], gap between two marquee, default is 0
      • direction: left right up down, default is left
      • mode: [auto | scroll | truncate | hover | force-hover] default is auto'
        • auto: contents are scrolled when overflow its parent
        • scroll mode always scrolled
        • truncate mode will truncate the content when overflow
        • hover mode will scroll when hover
        • force-hover mode will scroll when hovered, even if it's not overflow
      • autoUpdate: [boolean], whether marquee should update automatically, default is true
    • Headless Property
      • component: Component, marquee can be any component, default is div
      • slots: { first: Component; second: Component } set internal component, default is same as component
      • slotProps: { first: Props; second: Props } internal component's properties
      • ref: MarqueeRef, ref of marquee. It has updateOverflow method to update overflow status
import { Marquee } from '@suyongs/solid-utility';

const Component = () => {

  return (
    <Marquee component={'a'} href={'https://github.com'}>
      if you want to make this marquee 'a' tag, you should set component as 'a'
      <span>
        Also, you can set any components as marquee's children
      </span>
    </Marquee>
  );
};