Snacks

screenshot of Snacks
react

Snacks

The Instacart Component Library

Overview

The JavaScript Component Library by Instacart, called Snacks, is a pre-release library that provides a collection of reusable components for web development. The library is still in the pre-release stage, which means there may be breaking changes in the future.

Features

  • Reusable components for web development
  • Support for animations using react-transition-group
  • Compatibility with popular JavaScript libraries such as React and ReactDom
  • Easy installation with yarn or npm

Installation

You can install Snacks and its dependencies using either yarn or npm.

Using yarn

yarn add snacks

Using npm

npm install snacks

Snacks also has a few peer dependencies that are required to use the library. If your app already has these dependencies installed, there is no need to install them again.

For the main component library, the following dependencies are required:

  • prop-types v15 or v16
  • @instacart/radium v18+
  • React v15 or v16
  • ReactDom v15 or v16

If you would like to use animations, you will also need to install react-transition-group v2.2.

Summary

Snacks is a JavaScript component library by Instacart that offers a collection of reusable components for web development. It supports animations using react-transition-group and is compatible with popular JavaScript libraries such as React and ReactDom. The installation process is straightforward using yarn or npm, and the library has a few peer dependencies that may already be installed in your app. However, it is important to note that Snacks is still in the pre-release stage, so there may be breaking changes in the future.

react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

ui-kit
UI Kits & Components

A UI kit provides developers with a set of reusable components that can be easily integrated into a website or application. These components are pre-designed with consistent styling and functionality, allowing developers to save time and effort in the design and development process. UI kits can be either custom-built or third-party, and often include components for buttons, forms, typography, icons, and more.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.

webpack
Webpack

Webpack is a popular open-source module bundler for JavaScript applications that bundles and optimizes the code and its dependencies for production-ready deployment. It can also be used to transform other types of assets such as CSS, images, and fonts.