0.0.4 • Published 6 years ago

react-textures v0.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

react-textures

React wrapper around textures

Svg textures

import React from 'react'
import Texture from 'react-textures'

const Header = () =>
    <div> <!-- A container which has width and height -->
        <Texture
            orientation={['diagonal', '3/8', '7/8', '6/8']}
            strokeWidth={1.2}
        >
            <div>
                Header
            </div>
        </Texture>
    </div>
PropPropTypeDescriptionDefault
typestring oneOf('lines', 'circles', 'paths')type of patternlines
backgroundstringBackground color''
complementbooleanSwitch the background and foregroundfalse
dstring, funcSvg paths => 'M ${s / 4},${s * 3 / 4}l${s / 4},${-s / 2}l${s / 4},${s / 2}'
fillstringFill color#343434
orientationarray of stringsAngle of lines'diagonal'
radiusnumberRadius of circles2
shapeRenderingstringSvg shapeRenderingauto
sizenumbersize of pattern shape20
strokestringstroke color#343434
strokeWidthnumberstroke width2
0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago