Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blackbox-vision/ra-layout

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blackbox-vision/ra-layout

Custom layout for React Admin

  • 0.0.30
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

RA Layout License: MIT

Revamped React Admin UI.

Install

You can install this library via NPM or YARN.

NPM

npm i @blackbox-vision/ra-layout

YARN

yarn add @blackbox-vision/ra-layout

Use case

You're tired of the defacto React Admin UI and want to renew the look and feel.

Usage

The usage is really simple:

  1. Define your menu as a JSON structure like the following:
// menu.ts
import {
  LocalAtm,
  PermContactCalendar,
} from '@material-ui/icons';

export const items = [{
  type: 'group',
  label: 'Architects',
  items: [
    {
      type: 'resource',
      name: 'architects',
      label: 'Information',
      icon: PermContactCalendar,
    },
    {
      type: 'resource',
      name: 'commissions',
      label: 'Commissions',
      icon: LocalAtm,
    },
  ],
}]
  1. Import Layout pass props to it and you're ready:
// App.tsx
import React from 'react';
import { Admin } from 'react-admin';
import jsonServerProvider from 'ra-data-json-server';

import { Layout } from '@blackbox-vision/ra-layout';

import { items } from './menu';

const dataProvider = jsonServerProvider('https://jsonplaceholder.typicode.com');

export const App = () => {
  return (
    <Admin 
      dataProvider={dataProvider}
      layout={props => <Layout {...props} items={items} />}
    >
      <Resource name="users" list={ListGuesser} />
    </Admin>
  );
};

App.displayName = "App";

Props

Layout has the following props:

PropertiesTypesDefault ValueDescription
itemsArray[]The menu items to render

Issues

Please, open an issue following one of the issues templates. We will do our best to fix them.

Contributing

If you want to contribute to this project see contributing for more information.

License

Distributed under the MIT license. See LICENSE for more information.

FAQs

Package last updated on 13 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc