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

expo-tenor-search

v1.0.37

Published

A component for react native tenor gif search.

Downloads

123

Readme

expo-tenor-search

NPM JavaScript Style Guide

The expo-tenor-search component allows you to easily integrate Tenor GIFs into your React Native app. It features a user-friendly interface. This package is perfect for enhancing your app's visual appeal and engaging users with high-quality animated GIFs.

This package supports Tenor V2 APIs

Install

Open a Terminal in the project root and run:

yarn add expo-tenor-search

Usage

The GifSearch component is the main feature of the extension. Here are the features of the GifSearch component based on the code provided:

  • Customizable Search Filters: You can customize the search filters to provide only the type of GIFs that you want to show in your app. In the code, the Filter parameter is set to high, which limits the search results to only show GIFs that are safe for all ages. Other values for Filter is - off,low, medium,
  • Easy GIF Selection: The onGifSelect function is called when the user selects a GIF. A function handleGifSelect is provided that returns the selected GIF's URL.
  • Tenor API Key: To use the GifSearch component, you need to provide a Tenor API key. In the code, the tenorkey parameter is used to provide the API key. You can obtain an API key from Tenor's developer portal.

What to do with the results

After selecting the GIF, you can define the next process to be done using the handleGifSelect function. It will return an object containing the properties and metadata of the selected GIF in the data parameter.

Adding Custom styles

You can customize the styling of the component by passing in your own styles as props. There are two parts to the styles - the search box styles and the gif box styles.

For the search box, you can pass in CSS selectors using the following props:

  • searchContainer: Sets the style properties for a container element that contains a search bar.
  • closeButton: Sets the style properties for a button that allows the user to clear the search bar.
  • closeButtonText: Sets the style properties for the text inside the close button.

To modify the styles of the gif, you can use the following selectors:

  • button: Sets the style properties for a button element and changes the default appearance of the button.
  • .row: This selector sets the display to "flex" and sets the flex-wrap property to "wrap".
  • .column: Sets various style properties for an element with a class of "column". This selector sets the maximum width to 50%.
  • .giftext: Sets the style properties for an element with a class of "giftext". This selector affects the text shown in the gif categories page.
  • img: Sets the style properties for an img element.

Example implementation

import { GifSearch } from 'expo-tenor-search'

export default function GifScreen() {
  const handleGifSelect = (data) => {
    console.log(`Selected GIF: ${data}`)
  }

  const styles = {
    searchbox: {
      searchContainer: {
        height: 45
      }
    },
    gifbox: {
      img: {
        borderRadius: '10px'
      }
    }
  }
  return (
    <GifSearch
      tenorkey={'xxx-xxx-xxx-xxx'}
      Filter={'minimal'}
      onGifSelect={handleGifSelect}
      styles={styles}
    />
  )
}

categories

search results

License

MIT © Hexmos Technologies