Giter Site home page Giter Site logo

delpikye-v / react-material-tc-ifv4 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 7 KB

React mui-v4. Truncate text and show tooltip if need.

Home Page: https://www.npmjs.com/package/react-material-tc-i4z

License: MIT License

truncate-text truncate-tooltip

react-material-tc-ifv4's Introduction

react-material-tc-i4z

react-material-tc-i4z

LIVE EXAMPLE

Description

React Material (v.4). Truncate text and show tooltip if need (Text overflow)


Usage

Install the package

npm install react-material-tc-i4z

Import the module in the place you want to use:

import "react-material-tc-i4z/dist/styles.css";

import TruncateTooltip from "react-material-tc-i4z";

Snippet

simple
const [size, setSize] = useState(200);

<Button
  onClick={() => setSize(400)}
  onClick={() => setSize(200)}
  // style={{
  //    width: size, // => you should update it from css class
  // }}
  >
  <TruncateShowTooltip title="abdc">
    <span // it should be html element.
      style={{
        width: size, // => you should update it from css class
      }}
    >
      Hellofds fdsfsfsfdsdf fdsf s
    </span>
  </TruncateShowTooltip>
</Button>


props

TooltipProps: from react: @material-ui/core

props type description
always boolean default: false: show if text is overflow
bootstrapCss boolean default: true: arrow and color like bootstrapCss
tooltipBgColor string default: #000:
tooltipColor string default: #fff:

Note

RUN

LIVE EXAMPLE


License

MIT

react-material-tc-ifv4's People

Contributors

delpikye-v avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.