🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mimi-packetolo

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mimi-packetolo

A React component for creating comment inputs with user tagging functionality. Features include: @-mention suggestions, customizable trigger characters, and easy integration with any React application. Perfect for social media comments, chat applications,

1.1.2
latest
npm
Version published
Maintainers
1
Created
Source

mimi-packetolo

A React component for creating comment inputs with user tagging functionality. Features include: @-mention suggestions, customizable trigger characters, and easy integration with any React application. Perfect for social media comments, chat applications, or any interface requiring user mentions.

NPM JavaScript Style Guide

Install

npm install --save mimi-packetolo

Usage

import React, { useState } from 'react'
import { SuggestionInput } from 'mimi-packetolo'

const App = () => {
  const [comment, setComment] = useState('')
  const [chosenSuggestions, setChosenSuggestions] = useState<string[]>([])
  const suggestions = ['user1', 'user2', 'user3'] // Your list of suggestions

  return (
    <SuggestionInput
      comment={comment}
      setComment={setComment}
      suggestions={suggestions}
      chosenSuggestions={chosenSuggestions}
      setChosenSuggestions={setChosenSuggestions}
      suggestionsTrigger='@' // Optional: defaults to '@'
      placeHolder="Tag users using '@'" // Optional: defaults to "Tag using '@'"
      className='custom-class' // Optional: for custom styling
      inlineStyle={{ width: '300px' }} // Optional: for inline styling
    />
  )
}

Props

PropTypeRequiredDescription
commentstringYesCurrent input value
setComment(value: string) => voidYesFunction to update comment
suggestionsstring[]YesArray of available suggestions
chosenSuggestionsstring[]YesArray of selected suggestions
setChosenSuggestions(suggestions: string[]) => voidYesFunction to update chosen suggestions
suggestionsTriggerstringNoCharacter to trigger suggestions (default: '@')
placeHolderstringNoInput placeholder text
classNamestringNoCSS class for custom styling
inlineStyleCSSPropertiesNoInline styles for the component

License

MIT © MimiKapolo

FAQs

Package last updated on 08 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts