New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ant-design/pro-layout

Package Overview
Dependencies
Maintainers
0
Versions
583
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/pro-layout

@ant-design/pro-layout

  • 7.22.3
  • beta
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
139K
increased by0.61%
Maintainers
0
Weekly downloads
 
Created

What is @ant-design/pro-layout?

@ant-design/pro-layout is a layout component library for React applications, specifically designed to work seamlessly with Ant Design. It provides a set of high-level components and utilities to create professional and responsive layouts for web applications.

What are @ant-design/pro-layout's main functionalities?

Basic Layout

This code demonstrates how to create a basic layout using ProLayout. It includes a title, logo, and a simple menu with 'Home' and 'About' links.

```jsx
import React from 'react';
import ProLayout from '@ant-design/pro-layout';
import { PageContainer } from '@ant-design/pro-layout';

const BasicLayout = () => (
  <ProLayout
    title="My App"
    logo="/logo.png"
    menuDataRender={() => [
      { path: '/', name: 'Home' },
      { path: '/about', name: 'About' }
    ]}
  >
    <PageContainer>
      <div>Welcome to my app!</div>
    </PageContainer>
  </ProLayout>
);

export default BasicLayout;
```

Custom Menu

This code demonstrates how to create a layout with a custom menu. Each menu item includes an icon, enhancing the visual appeal and usability of the navigation.

```jsx
import React from 'react';
import ProLayout from '@ant-design/pro-layout';
import { PageContainer } from '@ant-design/pro-layout';

const CustomMenuLayout = () => (
  <ProLayout
    title="My App"
    logo="/logo.png"
    menuDataRender={() => [
      { path: '/', name: 'Home', icon: 'home' },
      { path: '/about', name: 'About', icon: 'info-circle' }
    ]}
  >
    <PageContainer>
      <div>Welcome to my app!</div>
    </PageContainer>
  </ProLayout>
);

export default CustomMenuLayout;
```

Breadcrumb Navigation

This code demonstrates how to add breadcrumb navigation to the layout. Breadcrumbs help users understand their current location within the app and navigate back to previous pages easily.

```jsx
import React from 'react';
import ProLayout from '@ant-design/pro-layout';
import { PageContainer } from '@ant-design/pro-layout';

const BreadcrumbLayout = () => (
  <ProLayout
    title="My App"
    logo="/logo.png"
    menuDataRender={() => [
      { path: '/', name: 'Home' },
      { path: '/about', name: 'About' }
    ]}
    breadcrumbRender={(route) => [
      { path: '/', breadcrumbName: 'Home' },
      { path: '/about', breadcrumbName: 'About' }
    ]}
  >
    <PageContainer>
      <div>Welcome to my app!</div>
    </PageContainer>
  </ProLayout>
);

export default BreadcrumbLayout;
```

Other packages similar to @ant-design/pro-layout

Keywords

FAQs

Package last updated on 17 Feb 2025

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