Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@strapi/design-system
Advanced tools
[![Version](https://img.shields.io/npm/v/@strapi/design-system?style=flat&colorA=4945ff&colorB=4945ff)](https://www.npmjs.com/package/@strapi/design-system) [![Downloads](https://img.shields.io/npm/dt/@strapi/design-system.svg?style=flat&colorA=4945ff&col
@strapi/design-system is a design system package for Strapi, a popular open-source headless CMS. It provides a set of reusable React components and utilities to help developers build consistent and accessible user interfaces within the Strapi ecosystem.
Button
The Button component is a reusable button element that can be used to trigger actions or navigate within the application.
import { Button } from '@strapi/design-system/Button';
const MyButton = () => (
<Button onClick={() => alert('Button clicked!')}>Click Me</Button>
);
Typography
The Typography component allows you to apply consistent text styles across your application, ensuring a uniform look and feel.
import { Typography } from '@strapi/design-system/Typography';
const MyText = () => (
<Typography variant="alpha">Hello, World!</Typography>
);
Modal
The Modal component provides a way to display content in a dialog box that overlays the main content, useful for forms, alerts, and additional information.
import { Modal, ModalHeader, ModalBody, ModalFooter } from '@strapi/design-system/Modal';
import { Button } from '@strapi/design-system/Button';
const MyModal = ({ isOpen, onClose }) => (
<Modal isOpen={isOpen} onClose={onClose}>
<ModalHeader>Modal Title</ModalHeader>
<ModalBody>
<p>This is the modal content.</p>
</ModalBody>
<ModalFooter>
<Button onClick={onClose}>Close</Button>
</ModalFooter>
</Modal>
);
Grid
The Grid component helps in creating responsive layouts by dividing the space into columns and rows, making it easier to align and distribute content.
import { Grid, GridItem } from '@strapi/design-system/Grid';
const MyGrid = () => (
<Grid gap={4}>
<GridItem col={6}>Item 1</GridItem>
<GridItem col={6}>Item 2</GridItem>
</Grid>
);
Material-UI is a popular React UI framework that implements Google's Material Design. It offers a wide range of components and customization options, making it a versatile choice for building modern web applications. Compared to @strapi/design-system, Material-UI is more general-purpose and widely adopted.
Chakra UI is a simple, modular, and accessible component library that gives you the building blocks to build React applications with speed. It focuses on ease of use and accessibility, similar to @strapi/design-system, but is not tied to any specific CMS.
Ant Design is a comprehensive design system and React UI library developed by Alibaba. It provides a wide range of high-quality components and design guidelines. Ant Design is more feature-rich and enterprise-focused compared to @strapi/design-system.
A UI component library for creating amazing Strapi extensions.
$ yarn add react react-dom @strapi/design-system @strapi/icons styled-components react-router-dom
# or
$ npm i react react-dom @strapi/design-system @strapi/icons styled-components react-router-dom
Wrap your application with the DesignSystemProvider
. You can additionally pass a theme and/or locale, although you don't have to as we have default values for both.
import { DesignSystemProvider, lightTheme } from '@strapi/design-system';
function MyApp({ children }) {
return (
<DesignSystemProvider locale="en-GB" theme={lightTheme}>
{children}
</DesignSystemProvider>
);
}
export default App;
Then, checkout the complete Storybook documentation to find the components you want to use and how to use them.
Please follow our CONTRIBUTING guidelines.
Licensed under the MIT License, Copyright © 2015-present Strapi Solutions SAS.
See LICENSE for more information.
FAQs
[![Version](https://img.shields.io/npm/v/@strapi/design-system?style=flat&colorA=4945ff&colorB=4945ff)](https://www.npmjs.com/package/@strapi/design-system) [![Downloads](https://img.shields.io/npm/dt/@strapi/design-system.svg?style=flat&colorA=4945ff&col
The npm package @strapi/design-system receives a total of 163,071 weekly downloads. As such, @strapi/design-system popularity was classified as popular.
We found that @strapi/design-system demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.