Git Product home page Git Product logo

chonky's Introduction

Chonky logo
NPM package MIT license NPM downloads GitHub stars Chat on Discord

Introduction

Chonky is constantly changing. Please create an issue if you have a problem or want to request a feature.

Chonky is a file browser component for React. It tries to recreate the native file browsing experience in your browser. This means your users can make selections, drag & drop files, toggle file view between "large thumbnails" and "detailed list", use keyboard shortcuts, and much more!


Features

  • Backend-agnostic - files can come from any source (remote server, S3, virtual FS).
  • Supports file sorting.
  • Supports text search.
  • Supports drag & drop.
  • Mobile-friendly design.
  • Supports image thumbnails.
  • Supports keyboard shortcuts.
  • Supports common and custom file actions.
  • Provides unique icons for each file extension.
  • (WIP) Supports detailed list and thumbnails views.
  • Supports file selections (excluding drag selection, for now).
  • Supports loading animations and async thumbnail generation.
  • Performs well with large file collections thanks to virtualization.

Quick usage

Add Chonky to your project:

npm install chonky

Use it in your React app:

import 'chonky/style/main.css';
import { FileBrowser, FileList, FileSearch, FileToolbar } from 'chonky';

export const ChonkyDemo = () => {
    const folderChain = React.useMemo(
        () => [
            { id: 'xXre', name: 'My Documents' },
            { id: 'BtrE', name: 'Websites' },
        ],
        []
    );

    const files = React.useMemo(
        () => [
            { id: '1eBr', name: 'index.html' },
            { id: 'xmFe', name: 'styles.css' },
            { id: 'vEgS', name: 'scripts.js' },
            { id: 'BVwA', name: 'favicon.ico' },
            { id: 'VsdE', name: 'robots.txt' },
        ],
        []
    );

    return (
        <FileBrowser files={files} folderChain={folderChain}>
            <FileToolbar />
            <FileSearch />
            <FileList />
        </FileBrowser>
    );
};

Preview

Chonky preview

License

MIT ยฉ Tim Kuzhagaliyev 2020

chonky's People

Contributors

timbokz avatar dependabot[bot] avatar levpolshkov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.