Socket
Socket
Sign inDemoInstall

@mui/base

Package Overview
Dependencies
11
Maintainers
7
Versions
128
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/base


Version published
Maintainers
7
Install size
6.46 MB
Created

Package description

What is @mui/base?

The @mui/base package is a collection of foundational components and utilities that are meant to be used as the building blocks for creating more complex Material-UI components. It provides low-level components with minimal styling that can be extended and customized for various use cases.

What are @mui/base's main functionalities?

Unstyled components

Provides unstyled versions of Material-UI components that can be used as a starting point for custom styling.

import { SliderUnstyled } from '@mui/base';

function MySlider() {
  return <SliderUnstyled defaultValue={30} />;
}

Hooks

Offers a set of hooks for managing component state and behavior, such as button states and focus management.

import { useButton } from '@mui/base/ButtonUnstyled';

function MyButton(props) {
  const { active, focusVisible, setFocusVisible, getRootProps } = useButton(props);
  return <button {...getRootProps()}>My Unstyled Button</button>;
}

Utilities

Includes utilities for handling owner state, component slots, and other low-level concerns in component development.

import { appendOwnerState } from '@mui/base';

function MyComponent(props) {
  const ownerState = { variant: 'contained' };
  const newProps = appendOwnerState(MyComponent, props, ownerState);
  return <div {...newProps} />;
}

Other packages similar to @mui/base

Changelog

Source

@mui/base@5.0.0-alpha.127

Breaking changes
  • <!-- 27 -->[base] Remove unstyled suffix from Base components + Codemod script (#36873) @hbjORbj

    The Unstyled suffix has been removed from all Base UI component names, including names of types and other related identifiers.

    You can use this codemod to help with the migration:

    npx @mui/codemod@latest v5.0.0/base-remove-unstyled-suffix <path>
    
Changes
  • <!-- 26 -->[codemod][base] Improve the removal of component prop codemod script (#36952) @hbjORbj
  • <!-- 25 -->[codemod][base] Write a migration script for removal of component prop from components (#36831) @hbjORbj
  • <!-- 24 -->[Base][useButton] Allow useButton params to be completely optional (#36922) @mj12albert

Readme

Source

@mui/base

This package hosts unstyled React components and hooks that can be used for creating custom design systems.

Installation

Install the package in your project directory with:

// with npm
npm install @mui/base

// with yarn
yarn add @mui/base

Documentation

The documentation

Keywords

FAQs

Last updated on 25 Apr 2023

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc