React Applications
Hopper is a Design System that provides a collection of React components, tokens, and icons to help you build applications.
Requirements:
- React 18 or higher.
Installation
Install Packages
Run the following command to install Hopper packages and their peer dependencies.
Setup provider
Wrap your application with the HopperProvider component. This sets up the global styles and context required for Hopper components. Typically, this is done in your index.tsx
or app.tsx
, but it may vary depending on your setup.
import { HopperProvider } from "@hopper-ui/components"; import { createRoot } from 'react-dom/client'; const root = createRoot(document.getElementById('root')); root.render( <HopperProvider withBodyStyle> <App /> </HopperProvider> );
Import Styles
Add Hopper styles to your project by importing the following CSS file. Place this in your global CSS file or main stylesheet.
@import url("@hopper-ui/components/index.css");
Enjoy!
Leverage Hopper's components and styled system to build user interfaces efficiently and with ease.
import { Button, Stack } from "@hopper-ui/components"; const Demo = () => { return ( <Stack> <Button>Click me</Button> <Button>Click me</Button> </Stack> ); }
Take it Further
Explore advanced features of Hopper to unlock its full potential:
Icons
Use a rich library of icons in your applications.
Client Side Routing
Ensure seamless navigation with Hopper components.
Color Schemes
Implement and customize dark mode for your application seamlessly.
Internationalization
Build applications for multiple languages and locales.
Responsive Styles
Design interfaces that adapt to different screen sizes.
Slots
Extend and compose components flexibly.
Styling
Style components with Hopper's styled system and override defaults.