About Evergreen, and getting set up with the package locally.
Evergreen is the UI framework upon we build product experiences at Segment. It serves as a flexible framework, and a lot of its visual design is informed through plenty of iteration with our design team, and external contributors.
Evergreen is based off a set of principles that help guide its decision:
Evergreen can be installed by either NPM or Yarn, using the following command(s). You should also have react@16.8.0
and react-dom@16.8.0
or higher versions.
$ npm install evergreen-ui // OR $ yarn add evergreen-ui
Once Evergreen is installed as a dependency in your project, you can import it as such:
import { Button, Pane, Text, majorScale } from 'evergreen-ui'
Then, you can use those components in your code like:
<Pane display="flex" alignItems="center" marginX={majorScale(2)}> <Button>Click me!</Button> <Text>This is a clickable Button</Text> </Pane>
Evergreen also comes with a Codesandbox Template. You can use it as an interactive prototyping environment to validate your ideas and send them to other folks. You can start by opening up the CodeSandbox Template here