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

@ambilight-taro/carousel

v1.0.0

Published

![NPM Version](https://img.shields.io/npm/v/%40ambilight-taro%2Fcarousel) ![NPM Downloads](https://img.shields.io/npm/dm/%40ambilight-taro%2Fcarousel)

Readme

@ambilight-taro/carousel

NPM Version NPM Downloads

Installation

npm install @ambilight-taro/carousel

Usage

轮播图组件,每一项都可完全自定义

组件会将每一个子节点渲染成一个轮播选项

组件会在初始化的时候自动查询组件本身宽高,故而需注意:

在初次渲染的时候就保证组件的尺寸是预期且后续不改变(组件默认会和父容器高度一致,可通过样式来设定组件、选项高度)

  • direction='horizontal' 横向轮播则需要保证宽度不变
  • direction='vertical' 纵向轮播则需要保证高度不变

Basic

<AlCarousel>
  <View style={{ color: 'red' }}>
    0
  </View>
  <View  style={{ color: 'blue' }}>
    1
  </View>
  <View style={{ color: 'black' }}>
    2
  </View>
  <View style={{ color: 'gray' }}>
    3
  </View>
</AlCarousel>

轮播方向

<AlCarousel direction="vertical">
  {/* children */}
</AlCarousel>

指示器样式

<AlCarousel indicatorVariant="combine">
  {/* children */}
</AlCarousel>

指示器位置

<AlCarousel indicatorPosition="top">
  {/* children */}
</AlCarousel>

禁用指示器

<AlCarousel indicatorDisabled>
  {/* children */}
</AlCarousel>

调整自动切换周期

// 禁用自动切换
<AlCarousel duration={0}>
  {/* children */}
</AlCarousel>

// 禁用自动切换
<AlCarousel duration={2000}>
  {/* children */}
</AlCarousel>

Props & Types

export interface AlCarouselProps {
  /**
   * 轮播方向
   * @default 'horizontal'
   */
  direction?: AlCarouselDirection
  /**
   * 指示器样式
   * @default 'dot'
   */
  indicatorVariant?: AlCarouselIndicatorVariant
  /**
   * 指示器位置
   * @default 'bottom'
   */
  indicatorPosition?: AlCarouselIndicatorPosition
  /**
   * 禁用指示器
   * @default false
   */
  indicatorDisabled?: boolean
  /**
   * 自动切换周期(ms)
   * - 0 代表无需自动切换
   * @default 0
   */
  duration?: number
  /**
   * 当前展示下标
   */
  value?: number
  /**
   * 当前展示下标(非受控,默认值)
   * @default 0
   */
  defaultValue?: number
  /**
   * 当前展示 index 变化事件
   */
  onChange?: (v: number) => void

  children?: React.ReactNode
  className?: string
  style?: React.CSSProperties | string
}
type AlCarouselDirection = "vertical" | "horizontal"

type AlCarouselIndicatorVariant = "combine" | "dot" | "line" | "slider"

type AlCarouselIndicatorPosition = "bottom" | "left" | "bottom-end" | "right" | "bottom-start" | "top"