# @react-md/utils

> General utils for react-md.

Latest version **5.1.6** (published 2023-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-md/utils
pnpm add @react-md/utils
yarn add @react-md/utils
bun add @react-md/utils
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.1.6 |
| Published | 2023-12-11 |
| First published | 2019-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2325 |
| Author | Mikkel Laursen |
| Maintainers | mlaursen |
| Keywords | accessibility, a11y, react-md, utils, throttled events, rtl, right to left websites, safari scroll fix |

## Links

- npm: https://www.npmjs.com/package/@react-md/utils
- Repository: https://github.com/mlaursen/react-md
- Homepage: https://react-md.dev/packages/utils/demos
- Issues: https://github.com/mlaursen/react-md/issues
- npm.io page: https://npm.io/package/@react-md/utils

## Dependencies (2)

- [classnames](https://npm.io/package/classnames.md) ^2.3.1
- [@juggle/resize-observer](https://npm.io/package/@juggle/resize-observer.md) ^3.3.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 5.1.6 (latest) — 2023-12-11
- 3.0.0-alpha.0 (next) — 2021-08-11
- 5.1.3 — 2022-05-07
- 5.1.2 — 2022-04-02
- 5.1.0 — 2022-03-18
- 5.0.0 — 2022-01-31
- 4.0.3 — 2022-01-01
- 4.0.1 — 2021-11-27
- 4.0.0 — 2021-11-24
- 3.1.0 — 2021-09-10
- 3.0.0 — 2021-08-13
- 2.9.1 — 2021-07-27
- 2.9.0 — 2021-07-18
- 2.8.4 — 2021-06-10
- 2.8.3 — 2021-05-18
- … 38 more at https://npm.io/package/@react-md/utils/versions

## README

# @react-md/utils

This package is for providing reusable accessibility hooks, components, and
utilities, a base css reset and other utility mixins, as well as general layout
and app size components and hooks. This package will be used by every other
scoped package within `react-md`, and has an extremely useful mixin for only
generating styles for packages that have been installed.

Check out the usage section below for more details.

## Installation

```sh
npm install --save @react-md/utils
```

<!-- DOCS_REMOVE -->

## Documentation

You should check out the
[full documentation](https://react-md.dev/packages/utils/demos) for live
examples and more customization information, but an example usage is shown
below.

<!-- DOCS_REMOVE_END -->

## Usage

The main export for this package will mainly be the exposed mixins which can be
included with the following import:

```scss
@import "@react-md/utils/dist/mixins";

@include rmd-utils-base;

.custom-class {
  @include rmd-utils-rtl {
    margin-left: auto;
    margin-right: 1rem;
  }

  margin-left: 1rem;
}

.button {
  @include rmd-utils-hide-focus-outline;
}
```

### Usage with other packages

One of the great things about this package is that there is a mixin that will
automatically include all the react-md styles for packages you have included in
this file.

```scss
@import "@react-md/app-bar/dist/mixins";
@import "@react-md/avatar/dist/mixins";
@import "@react-md/button/dist/mixins";
@import "@react-md/elevation/dist/mixins";
@import "@react-md/utils/dist/mixins";

@include react-md-utils;
```

The example above will automatically include the styles for the `app-bar`,
`avatar`, and `button` packages as well as the base styles utils styles.

---
_Source: https://npm.io/package/@react-md/utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
