Skip to Content

Texture

Applies a decorative texture behind its contents. Use it to add dots, stripes, grids, and other patterned backgrounds without separate image assets.

Usage

Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill

<div data-unitone-layout="texture -texture:dots"> <div> <div data-unitone-layout="decorator -padding:1"> <p>Lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill</p> </div> </div> </div>

Props

HTML -texture:{variation} / JSX texture={variation}

Texture type.

The available props vary depending on the type.

dots / offset-dots / grid / horizontal-stripe / vertical-stripe / checker-pattern / graph-paper / slash / backslash / wave / solid-color / slash-shape

dots

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:dots"> ... </div>

offset-dots

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:offset-dots"> ... </div>

grid

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:grid"> ... </div>

horizontal-stripe

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:horizontal-stripe"> ... </div>

vertical-stripe

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:vertical-stripe"> ... </div>

checker-pattern

Support props: textureColor, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:checker-pattern"> ... </div>

graph-paper

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:graph-paper"> ... </div>

slash

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:slash"> ... </div>

backslash

Support props: textureColor, textureSize, textureGap, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:backslash"> ... </div>

wave

Support props: textureColor, textureSize, textureTop, textureRight, textureBottom, textureLeft, textureTop, textureRight, textureBottom, textureLeft

<div data-unitone-layout="texture -texture:wave"> ... </div>

solid-color

Support props: textureColor, textureTop, textureRight, textureBottom, textureLeft, textureBorderRadius, textureBorderTopLeftRadius, textureBorderTopRightRadius, textureBorderBottomRightRadius, textureBorderBottomLeftRadius

<div data-unitone-layout="texture -texture:solid-color"> ... </div>

slash-shape

Support props: textureColor, textureBandTopSize, textureBandBottomSize

<div data-unitone-layout="texture -texture:slash-shape"> ... </div>

backslash-shape

Support props: textureColor, textureBandTopSize, textureBandBottomSize

<div data-unitone-layout="texture -texture:backslash-shape"> ... </div>

HTML --unitone--texture-color / JSX textureColor={value}

Set texture color.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-color: #2e1065"> ... </div>

HTML --unitone--texture-gap / JSX textureGap={value}

Set texture gap.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-gap: 10px"> ... </div>

HTML --unitone--texture-size / JSX textureSize={value}

Set texture size.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-size: 10px"> ... </div>

HTML --unitone--texture-top / JSX textureTop={value}

Set texture top offset.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-top: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-right / JSX textureRight={value}

Set texture right offset.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-right: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-bottom / JSX textureBottom={value}

Set texture bottom offset.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-bottom: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-left / JSX textureLeft={value}

Set texture left offset.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-left: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-border-radius / JSX textureBorderRadius={value}

Set texture border radius.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-border-radius: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-border-top-left-radius / JSX textureBorderTopLeftRadius={value}

Set texture border top left radius.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-border-top-left-radius: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-border-top-right-radius / JSX textureBorderTopRightRadius={value}

Set texture border top right radius.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-border-top-right-radius: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-border-bottom-right-radius / JSX textureBorderBottomRightRadius={value}

Set texture border bottom right radius.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-border-bottom-right-radius: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-border-bottom-left-radius / JSX textureBorderBottomLeftRadius={value}

Set texture border bottom left radius.

<div data-unitone-layout="texture -texture:dots" style="--unitone--texture-border-bottom-left-radius: 50px; --unitone--texture-gap: 2px"> ... </div>

HTML --unitone--texture-band-top-size / JSX textureBandTopSize={value}

Set the size of the top of the band.

<div data-unitone-layout="texture -texture:slash-shape" style="--unitone--texture-band-top-size: 1%"> ... </div>

HTML --unitone--texture-band-bottom-size / JSX textureBandBottomSize={value}

Set the size of the bottom of the band.

<div data-unitone-layout="texture -texture:slash-shape" style="--unitone--texture-band-bottom-size: 1%"> ... </div>
Last updated on