0.1.2 • Published 9 years ago

react-slug v0.1.2

Weekly downloads
211
License
ISC
Repository
github
Last release
9 years ago

##React Slug gif demo

##Install

npm install react-slug

##Example

It acts exactly the same as a regular input, the onChange will return the event as a second parameter.

import React from 'react'
import Slug from 'react-slug'

export default class App extends React.Component{

  constructor(){
    super()
    this.handleChange = this.handleChange.bind(this)
  }

  handleChange(event){
    console.log(event.target.value)
  }

  render(){
    return <Slug value="this will be stringified" onChange={this.handleChange} className="test" />
  }
}

###Rebuilding

Run this to view the example in example/dist

npm run build

###Description

This is a super simple react component that will strip any non alpha-numeric characters for you. It will turn spaces into hyphens. Thanks to Jed Watson for the gulpfile stuff ;)

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago