suy-mentions
v0.1.2
Published
A mentions component for React
Readme
suy-mentions
A simple React mentions component.
Installation
npm install suy-mentions
# or
yarn add suy-mentionsUsage
import { Mentions } from 'suy-mentions';
function App() {
const handleChange = (value) => {
console.log('Mentions value:', value);
};
return (
<Mentions
value=""
onChange={handleChange}
placeholder="Type @ to mention someone..."
/>
);
}Props
| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | '' | The value of the mentions input | | onChange | (value: string) => void | - | Callback when value changes | | placeholder | string | 'Type @ to mention someone...' | Placeholder text |
Development
# Install dependencies
npm install
# Start development
npm run dev
# Build
npm run build
# Run tests
npm test
# Lint
npm run lintLicense
MIT
