Arwes

Arwes application container. This component should wrap the application components. It can have a background image and a pattern image between the background and the content. It uses <Puffs /> component to display an animation between the children and the background.

<Arwes
    animate
    pattern='/static/img/glow.png'
    background={{
        small: '/static/img/small.jpg',
        medium: '/static/img/medium.jpg',
        large: '/static/img/large.jpg',
        xlarge: '/static/img/xlarge.jpg'
    }}
>
    <p>Application elements</p>
</Arwes>

The component is fixed positioned in the page so there should be only one.

The component also apply default styles to common HTML tags so it prevents global styles pollution.

Prop nameTypeDefaultDescription
AnimationanyAnimationComponent
PuffsanyPuffsComponent
createResponsiveanycreateResponsiveModule
createLoaderanycreateLoaderModule
themeanyRequired
classesanyRequired
animatebool
showbooltrue
animationobject
backgroundunion

Background image resources.

One of type: string, shape
patternunion

Pattern image resources.

One of type: string, shape
loadResourcesbooltrue

If the component should load the resources.

showResourcesbooltrue

If to show the resources when they are loaded.

puffsPropsobject

Properties to pass down to <Puffs /> component.

childrenany

If function, receives the animation status object.

Method nameParametersDescription
getActiveResources

Get active resources from resources props.

Returns Object
loadResources

Load active resources if they can be loaded. Doesn’t return the state, it only loads the data.

Source code: src/Arwes Open in: Playground