Socket
Socket
Sign inDemoInstall

@suyongs/solid-utility

Package Overview
Dependencies
5
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @suyongs/solid-utility

Utilities for SolidJS


Version published
Maintainers
1
Install size
51.4 kB
Created

Readme

Source

solid-utility

Utility component, hooks or anything else for Solid JS

Installation

  • 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
    • speed: [number], move speed of marquee. pixel per seconds, default is 70
    • direction: left right up down, default is left
    • mode: auto scroll, in auto mode, contents are scrolled when overflow its parent, scroll mode always scrolled, default is auto
    • component: Component, marquee can be any component, default is div - [ ] behavior: TODO
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
    </Marquee>
  );
};

FAQs

Last updated on 17 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc