MiniCardAudio displays an audio card with optional waveform animation and custom styling options.

This component supports showing an animated waveform, an image, and custom positioning for the overlay. It is designed for displaying audio-related information in a visually appealing, customizable way.

import React from 'react';
import { MiniCardAudio } from 'mediasfu-reactnative';

function App() {
return (
<MiniCardAudio
name="Alice Johnson"
showWaveform={true}
overlayPosition="bottomRight"
barColor="blue"
textColor="white"
imageSource="https://example.com/profile.jpg"
roundedImage={true}
customStyle={{ width: 100, height: 100 }}
/>
);
}

export default App;

Properties

propTypes?: WeakValidationMap<MiniCardAudioOptions>

Used to declare the types of the props accepted by the component. These types will be checked during rendering and in development only.

We recommend using TypeScript instead of checking prop types at runtime.

contextTypes?: ValidationMap<any>

Lets you specify which legacy context is consumed by this component.

defaultProps?: Partial<MiniCardAudioOptions>

Used to define default values for the props accepted by the component.

type Props = { name?: string }

const MyComponent: FC<Props> = (props) => {
return <div>{props.name}</div>
}

MyComponent.defaultProps = {
name: 'John Doe'
}
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'