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

react-native-audio-card-view

v1.0.8

Published

A card item with a title, a subtitle, and an audio player button

Downloads

3

Readme

React Native Audio Card View is a card item with a title, a subtitle, and an audio player button.

Support

iOS & Android

Installation

npm install react-native-audio-card-view

Installing dependencies

npm install react-native-vector-icons react-native-sound react-native-audio-player-button

Usage

import AudioCardView from 'react-native-audio-card-view';
import FAIcon from 'react-native-vector-icons/FontAwesome';

//...
const [playingUuid, setPlayingUuid] = React.useState(null);

<AudioCardView
  audio={require('testing_audio.mp3')}
  audioPosition='top-left'
  containerStyle={{marginTop: 10, height: 120, width: '100%'}}
  title="Card item title"
  subtitle="Card item subtitle"
  customIcon={<FAIcon/>}
  customIconSet={{play: 'play-circle', pause: 'pause-circle', mute: 'repeat'}}
  onPress={() => console.log('do something')}
/>

Properties

Basic

| Prop | Default | Type | Optional | Description | | :------------------ | :-----------: | :--------: | :--------: | :------------------------------------------------------------------------------------------- | | uuid | null | string | false | A unique uuid of the audio or the uuid of the button (to prevent playing audio overlap) | | title | null | string | false | The title of the card item (maximum 2 lines) | | subtitle | null | string | false | The subtitle of the card item (maximum 1 lines) | | primaryColor | '#000000' | string | true | The color of the audio icon before playing the audio | | secondaryColor | '#808080' | string | true | The color of the audio icon while playing the audio | | audio | null | .mp3 | true | The audio file for playing | | playingUuid | null | string | true | The uuid of the playing audio | | disabled | false | boolean | true | The disabled status of the card item | | disabledColor | '#CDCCCC' | string | true | The background color of the card item when disabled | | audioPosition | 'top-left' | string | true | The position of the audio button ('top-left', 'left', 'right') | | showDraggableIcon | false | boolean | true | To show the 3 dots icon to indicate the card is draggable | | hideAudioPlayer | false | boolean | true | To hide the audio player button | | isFromAppBundle | false | boolean | true | Set to true to play the audio that is stored in the app bundle (ex: the downloaded audio) | | allowFlexibleHeight | false | boolean | true | Set to true to make the card height flexible based on the length of the title |

Custom styles

| Prop | Default | Type | Optional | Description | | :-------------------------- | :---------: | :-------: | :--------: | :--------------------------------------------------------- | | containerStyle | {...} | style | true | Style of the card item container | | labelContainerStyle | {...} | style | true | Style of the title and subtitle container | | titleStyle | {...} | style | true | Style of the title | | subtitleStyle | {...} | style | true | Style of the subtitle | | audioButtonContainerStyle | {...} | style | true | Style of the audio button container | | audioButtonStyle | {...} | style | true | Style of the audio button | | audioIconStyle | {...} | style | true | Style of the audio icon | | audioRippleStyle | {...} | style | true | Style of the audio ripple animation while playing | | draggableIconContainerStyle | {...} | style | true | Style of the draggable icon container | | draggableIconStyle | {...} | style | true | Style of the draggable icon | | customNotPlayingIconStyle | {...} | style | true | Style of the audio icon when is not playing | | customPlayingIconStyle | {...} | style | true | Style of the audio icon while playing |

Custom components

| Prop | Default | Type | Optional | Description | | :----------------- | :-------------------------------: | :----: | :--------: | :--------------------------------------------------- | | customAudioIcon | {...} | comp | true | Custom audio icon component | | customAudioIconSet | {{play: '', pause: '', mute: ''}} | hash | true | A hash of the custom icon names |

Child component

<AudioCardView {...props}>
  <Text>Child component</Text>
</AudioCardView>

Events

| Prop | Default | Type | Optional | Description | | :---------------- | :-------: | :-------: | :--------: | :------------------------------------------------------------------- | | updatePlayingUuid | {...} | event | false | On press the button, to update the uuid of the playing item | | onPress | {...} | event | true | Event when pressing the card item | | onLongPress | {...} | event | true | Event when long pressing the card item |

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.


Made with create-react-native-library