npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@moderntribe/wme-ui

v3.1.0

Published

Components and hooks to build the best UX/UI admin wizards

Downloads

19

Readme

WME Framework

Overview

WME contains all the components needed to build an easy-to-use UI. Although it was intially designed to work in the WordPress admin, it can be utilizied anywhere. It does not depend on WordPress in any way.

WME is built in React and TypeScript. The framework relies heavily on Material UI.

The WME components are either styled MUI components (such as a Button) or wrappers designed to easily build complex components, such as FileUpload.

Documentation

Each individual component is showcased in the WME StoryBook and should have its own documentation. Use the Canvas tab to see a playground of the component, and then the Docs tab to see detailed documentation for each component as well as an arguments table.

The framework also contains Wizard components, which are building blocks for fullscreen wizards such as set up screens, plugin configuration, etc.

To create a new wizard, use the Wizard component:

<Wizard {...wizardProps}>
  <WizardSectionTitle
    heading="Wizard Content"
    copy={copyText}
    iconSrc={welcomeImage}
    iconAlt="icon alt text"
    iconWidth={75}
  />
  <Box>
    <h3>An example of wizard content</h3>
    <Typography>Inside the wizard, add your content. You can use both MUI and WME components</Typography>
    <Typography>For example, you can build a form using WME components</Typography>
    <Form>
      <FormFieldControl>
        <FormField
          field={<TextInput />}
          label="Text Field"
        />
      <FormFieldControl>
    </Form>
  </Box>
  <WizardFooter {...footerProps} />
</Wizard>

WME components are designed to be used at a granular level if needed. For example, you can use just the FormFieldLabel component if you need a styled label, but if you want an entire input field, you could use FormField like in the example above, which encompasses all the parts necessary for a complete form field.

All components come pre-styled based on the WME design, but can be tweaked using the MUI sx prop on an individual basis, or by using the MUI global styleOverrides on a global site level.

Installation

Install latest version from NPM.

npm i @moderntribe/wme-ui

Example:

import type React from 'react';
import { Button, SetupCardTask } from '@moderntribe/wme-ui';
import TaskIcon from '../img/task-icon.png';

const MyComponent = () => {

  const handleClick = (event: React.MouseEvent<HTMLElement>) => {
    console.log(event);
  };

  <div className="my-component">
    <h1>Here's a primary button</h1>
    <Button variant="contained" color="primary">
      Click Me:
    </Button>

    <h2>Here's a Setup Card Task<h2>
    <SetupCardTask
      title="Example task"
      variant="task"
      intro="Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum."
      taskCta="Go to task"
      avatarProps={
        src: {TaskIcon}
      }
      onClick={handleClick}
    />

  <div>
};

export default MyComponent;