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

alley-components

v0.3.7

Published

一个专门为桌面软件写的 solidjs 简单组件库。

Downloads

126

Readme

Alley Components

一个专门为桌面软件写的 solidjs 简单组件库。

本框架应用于使用 taurielectron 开发的桌面软件,所以当前未实现messagenotificationmodal等反馈组件,这些组件可通过桌面开发框架调用系统 API 或创建多窗口实现。

参考了一些 React 组件库的实现,包括:

  • antd
  • mui

1 安装

pnpm i alley-components

2 使用

本组件库专为本组织内的桌面程序开发,非全功能组件,请谨慎在其他项目中使用,否则会面临功能缺失的问题。

所有的组件在使用时都会自动导入其对应的样式,但这些独立的样式文件中会使用到全局的样式变量,为了避免组件样式的正常渲染,建议在index.tsxApp.tsx中导入全局 css 文件:

import "alley-components/lib/index.css";

2.1 按需加载

本项目只打包为 ESM 格式,天生支持按需加载,在使用时正常导入即可,如:

import { Button } from "alley-components";

2.2 懒加载

本项目本身体积就很小,但你也可以使用懒加载,同样以Button组件为例:

import { lazy } from "solid-js";

const LazyButton = lazy(() => import("alley-components/lib/components/button"));

懒加载能够将Button组件单独打包到一个 js 文件中,避免打包产物体积过大。

3 示例和开发

查看在线运行效果:codesandbox

克隆本仓库并安装依赖后执行:

pnpm dev

在任意浏览器中打开http://127.0.0.1:5173可查看组件运行效果。