4.0.21 • Published 2 years ago

mui-label-divider v4.0.21

Weekly downloads
6
License
MIT
Repository
github
Last release
2 years ago

mui-label-divider

Labeled divider component for Material-UI / React

NPM JavaScript Style Guide

Install

npm install --save mui-label-divider

Usage Examples

import { CollapsibleLabelDivider, LabelDivider } from "mui-label-divider";
import { useState } from "react";

export default function App() {
  const [open, setOpen] = useState(false);

  return (
    <>
      <LabelDivider label="SIMPLE" />
      <LabelDivider label="CLICKABLE" onClick={() => alert("clicked")} />
      <CollapsibleLabelDivider
        label={`${open ? "HIDE" : "SHOW"} CONTENT`}
        open={open}
        onClick={() => setOpen((x) => !x)}
      >
        content
      </CollapsibleLabelDivider>
    </>
  );
}

Light theme Dark theme Collapsible

Credits

Adapted for Material-UI from Puigcerber's original raw html/css solution at https://stackoverflow.com/questions/5214127/css-technique-for-a-horizontal-line-with-words-in-the-middle.

Inspired by https://wikiki.github.io/layout/divider/.

License

MIT © gregorychen3

4.0.21

2 years ago

4.0.19

2 years ago

4.0.9

2 years ago

4.0.8

2 years ago

4.0.20

2 years ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.10

2 years ago

4.0.7

2 years ago

4.0.6

2 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.3

2 years ago

4.0.2

3 years ago

4.0.16

2 years ago

4.0.15

2 years ago

4.0.18

2 years ago

4.0.17

2 years ago

4.0.12

2 years ago

4.0.11

2 years ago

4.0.14

2 years ago

4.0.13

2 years ago

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.0

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago