Skip to content
🌱 garden React (no-UI) containers
TypeScript JavaScript Other
Branch: master
Clone or download
hzhu chore(release): publish
 - @zendeskgarden/container-focusjail@1.4.0
 - @zendeskgarden/container-modal@0.7.3
Latest commit d2a5313 Feb 21, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: update renovate configuration (#102) Sep 19, 2019
.storybook chore: apply garden logo to demo pages (#138) Dec 3, 2019
demo chore: apply garden logo to demo pages (#138) Dec 3, 2019
packages chore(release): publish Feb 21, 2020
utils fix(build): improve bundle size with @babel/runtime (#162) Feb 20, 2020
.editorconfig chore: initialise repo Jan 16, 2019
.eslintrc.json
.gitignore feat(build): introduce rollup for CJS and ES module bundles (#158) Feb 12, 2020
.huskyrc feat(build): introduce rollup for CJS and ES module bundles (#158) Feb 12, 2020
.lintstagedrc feat(build): introduce rollup for CJS and ES module bundles (#158) Feb 12, 2020
.markdownlintrc chore: initialise repo Jan 16, 2019
.nvmrc
.prettierrc chore: initialise repo Jan 16, 2019
.travis.yml feat(utilities): migrate container-utilities to TypeScript (#103) Sep 19, 2019
.yarnclean feat(focusvisible): migrate focusvisible to TypeScript (#137) Nov 14, 2019
LICENSE.md chore: initialise repo Jan 16, 2019
README.md
babel.config.js fix(build): improve bundle size with @babel/runtime (#162) Feb 20, 2020
lerna.json
package.json
renovate.json chore: update renovate schedule (#106) Sep 25, 2019
tsconfig.json feat(selection|buttongroup): migrate useSelection and useButtonGroup … Sep 25, 2019
yarn.lock

README.md

Garden React Containers Build Status Dependency Status Coverage Status

🌱 Garden is a design system for Zendesk

Garden Containers provide an accessible foundation to start from in your journey to building a11y, keyboard navigable and RTL aware components.

Installation

See the individual package README for the React container you would like to install.

Package Version Size Dependencies
@zendeskgarden/container-accordion npm version npm version Dependency Status
@zendeskgarden/container-breadcrumb npm version npm version Dependency Status
@zendeskgarden/container-buttongroup npm version npm version Dependency Status
@zendeskgarden/container-field npm version npm version Dependency Status
@zendeskgarden/container-focusjail npm version npm version Dependency Status
@zendeskgarden/container-focusvisible npm version npm version Dependency Status
@zendeskgarden/container-keyboardfocus npm version npm version Dependency Status
@zendeskgarden/container-modal npm version npm version Dependency Status
@zendeskgarden/container-pagination npm version npm version Dependency Status
@zendeskgarden/container-schedule npm version npm version Dependency Status
@zendeskgarden/container-selection npm version npm version Dependency Status
@zendeskgarden/container-tabs npm version npm version Dependency Status
@zendeskgarden/container-tooltip npm version npm version Dependency Status
@zendeskgarden/container-utilities npm version npm version Dependency Status

Usage

Our packages are easily consumable with create-react-app and standard webpack configs.

All packages follow a similar installation process. Below is an example of consuming our container-schedule package.

Install dependencies

# Install garden package
npm install @zendeskgarden/container-schedule

Using as a hook

import React from 'react';
import { render } from 'react-dom';

/** Consume throughout app */
import { useSchedule } from '@zendeskgarden/container-schedule';

const App = () => {
  const elapsed = useSchedule({ duration: 1000 });
  const x = 900;
  const styles = {
    transform: translateX(`${900 * elapsed}px`)
  };

  return <div style={styles} />;
};

render(<App />, document.getElementById('root'));

Using as a render prop container

import React, { Component } from 'react';
import { render } from 'react-dom';

/** Consume throughout app */
import { ScheduleContainer } from '@zendeskgarden/container-schedule';

class App extends Component {
  render() {
    return (
      <ScheduleContainer>
        {elapsed => (
          const x = 900;
          const styles = {
            transform: translateX(`${900*elapsed}`px)
          }

          return <div style={styles} />
        )}
      </ScheduleContainer>
    );
  }
}

render(<App />, document.getElementById('root'));

Contribution

Thanks for your interest in Garden! Community involvement helps make our design system fresh and tasty for everyone.

Got issues with what you find here? Please feel free to create an issue.

If you'd like to take a crack at making some changes, please follow our contributing documentation for details needed to submit a PR.

Community behavior is benevolently ruled by a code of conduct. Please participate accordingly.

License

Copyright 2019 Zendesk

Licensed under the Apache License, Version 2.0

You can’t perform that action at this time.