Arwes packages are categorized by "vanilla" and "implementation" packages. Arwes vanilla packages do not have UI libraries or frameworks dependencies, while the implementation packages depend on specific UI tools to simplify their use and add custom UI components.
Their purpose can be for visual, motion, or audio design, or UI components implementations. The Playground can be used to experiment with various use cases in real-time in browser to get a sense of what is possible to do.
Vanilla
Vanilla packages can be used with any other UI library but many tools are low level APIs and require more elaborated configurations. Implementation packages mostly provide "sugar-APIs" to facilitate their use.
Available vanilla packages:
Package
Status
Stats
Description
@arwes/tools
Polishing
General browser API tools
@arwes/theme
Development
Color, units, and general purpose dynamic theming tools
@arwes/animated
Polishing
HTML element animation utilities
@arwes/animator
Polishing
Assemble and disassemble user interfaces using animation controls
@arwes/bleeps
Polishing
Define, manage, and control interactive short sound effects
@arwes/text
Polishing
Text rendering effect tools
@arwes/frames
Polishing
Build responsive vector graphics components
@arwes/bgs
Development
Passive UI background effects
@arwes/core
Development
Core UI functionalities
arwes
Polishing
All vanilla packages bundle
React
The framework offers React.js v18 specific packages with SSR support.
Get started with Next.js or any other React setup for a new or existing project.
Arwes does not work with React strict mode nor React Server Components.
If using Next.js, in the configuration file, disable React strict mode:
// next.config.js
module.exports={
reactStrictMode:false
};
And then install Arwes for React.
npm install @arwes/react@1.0.0-alpha.23
The package re-exports all the vanilla packages and the React specific packages.
One possible solution for styling can be Emotion. Install Emotion for React.
npm install @emotion/react
Arwes provides a base customizable theme and global baseline styles. They can be applied with the Emotion <Global/> component.
If the app is going to use the Arwes animator system, some optional global animation settings can be setup at the root component. For example, to enable/disable animations or their durations.
To experiment with some Arwes building blocks, a card component can be created to display a title and a description. It would use a custom frame style (with colors defined by CSS) and transition animations for the text.
import{
useBleeps,
BleepsOnAnimator,
Animated,
FrameSVGCorners,
Text,
aa,
aaVisibility
}from'@arwes/react';
constCard=():ReactElement=>{
const bleeps =useBleeps();
return(
<Animatormergecombinemanager='stagger'>
{/* Play the intro bleep when card appears. */}
<BleepsOnAnimator
transitions={{ entering:'intro'}}
continuous
/>
<Animated
className='card'
style={{
position:'relative',
display:'block',
maxWidth:'300px',
margin: theme.space([4,'auto']),
padding: theme.space(8),
textAlign:'center'
}}
// Effects for entering and exiting animation transitions.
animated={[aaVisibility(),aa('y','2rem',0)]}
// Play bleep when the card is clicked.
onClick={()=> bleeps.click?.play()}
>
{/* Frame decoration and shape colors defined by CSS. */}
Futuristic science fiction user interface web framework.
</Text>
</Animator>
</Animated>
</Animator>
);
};
constApp=():ReactElement=>{
return(
<>
<Animator>
<Card/>
<Animator>
{/* ... */}
</>
);
};
With all these elements there is a simple web page with custom and flexible sci-fi effects. Open the playground sandbox to see it in real-time in-browser.