0.0.1-alpha.1 • Published 8 years ago

md-tooltip v0.0.1-alpha.1

Weekly downloads
70
License
MIT
Repository
github
Last release
8 years ago

md-tooltip

Native Angular2 Material Tooltip directive

Installation

npm install --save md-tooltip

API

Example:

<span tooltip-direction="left" tooltip="On the Left!">Left</span> <br />
<span tooltip-direction="right" tooltip="On the Right!">Right</span> <br />
<span tooltip-direction="bottom" tooltip="On the Bottom!">Bottom</span> <br />
<span tooltip-direction="top" tooltip="On the Top!">Top</span> <br />
<span tooltip-delay='1000' tooltip='appears with delay'>Delayed 1 Second</span>
//app-module.ts

import {MdTooltipModule} from 'md-tooltip/tooltip';

@NgModule({
 imports: [
   MdTooltipModule,
 ],
 declarations: [
   ...
 ]  
})

//component.ts
...

@Component({
   selector: "..."
})

export class ... {
   
   ...

}

Properties

  • tooltip (string) - text of tooltip.
  • tooltip-direction (?string='bottom') - tooltip direction instruction, supported positions: 'top', 'bottom', 'left', 'right'.
  • tooltip-delay (?numer=0) - time in milliseconds before tooltip occurs.