랭킹으로 돌아가기

StephanWagner/jBox

JavaScriptstephanwagner.me/jBox

jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.

tooltipmodalmodal-dialogdialogconfirmation-dialogconfirmconfirmation-modalpopuppopup-windowpopup-messagemodal-windownotice
스타 성장
스타
1.4k
포크
273
주간 성장
이슈
19
5001k
2023년 1월2023년 6월2023년 11월2024년 5월
아티팩트npmnpm install jbox
README

jBox

jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.

Demo: https://stephanwagner.me/jBox

Docs: https://stephanwagner.me/jBox/documentation


Install

ES6

npm install --save jbox
import jBox from 'jbox';
import 'jbox/dist/jBox.all.css';

CDN

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/StephanWagner/jBox@v1.3.2/dist/jBox.all.min.js"></script>
<link href="https://cdn.jsdelivr.net/gh/StephanWagner/jBox@v1.3.2/dist/jBox.all.min.css" rel="stylesheet">

Tooltips

Create a new instance of jBox Tooltip and attach it to elements:

new jBox('Tooltip', {
  attach: '.tooltip'
});

Now elements with class="tooltip" will open tooltips:

<span class="tooltip" title="My first tooltip">Hover me!</span>
<span class="tooltip" title="My second tooltip">Hover me!</span>

You can set up modal windows the same way as tooltips. But most of times you'd want more variety, like a title or HTML content:

new jBox('Modal', {
  width: 300,
  height: 200,
  attach: '#myModal',
  title: 'My Modal Window',
  content: '<i>Hello there!</i>'
});
<div id="myModal">Click me to open a modal window!</div>

Confirm windows

Confirm windows are modal windows which requires the user to confirm a click action on an element. Give an element the attribute data-confirm to attach it:

new jBox('Confirm', {
  confirmButton: 'Do it!',
  cancelButton: 'Nope'
});
<div onclick="alert('Yay! You did it!')" data-confirm="Do you really want to do this?">Click me!</div>
<a href="https://stephanwagner.me/jBox" data-confirm="Do you really want to leave this page?">Click me!</a>

Notices

A notice will open automatically and destroy itself after some time:

new jBox('Notice', {
 content: 'Hurray! A notice!'
});

Images

To create image windows you only need following few lines:

new jBox('Image');
<a href="/image-large.jpg" data-jbox-image="gallery1" title="My image">
  <img src="/image.jpg" alt="">
</a>

Learn more

These few examples are very basic. The jBox library is quite powerful and offers a vast variety of options to customize appearance and behavior. Learn more in the documentation: https://stephanwagner.me/jBox/documentation

관련 저장소
Semantic-Org/Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.

JavaScriptnpmMIT Licenseuiui-components
semantic-ui.com
51k4.9k
floating-ui/floating-ui

A JavaScript library to position floating elements and create interactions for them.

TypeScriptnpmMIT Licensepositioning-enginetooltip
floating-ui.com
32.7k1.7k
you-dont-need/You-Dont-Need-JavaScript

CSS is powerful, you can do a lot of things without JS.

HTMLGNU General Public License v3.0cssjavascript
20.6k1.5k
atomiks/tippyjs

Tooltip, popover, dropdown, and menu library

JavaScriptnpmMIT Licensetooltippopover
atomiks.github.io/tippyjs/
12.3k540
chinchang/hint.css

A CSS only tooltip library for your lovely websites.

CSSnpmMIT Licensetooltip-librarypurecss
kushagra.dev/lab/hint/
8.4k682
ng-bootstrap/ng-bootstrap

Angular powered Bootstrap

TypeScriptnpmMIT Licenseangularng-bootstrap
ng-bootstrap.github.io
8.2k1.6k
gilbarbara/react-joyride

Create guided tours in your apps

TypeScriptnpmMIT Licensereactreact-component
react-joyride.com
7.8k590
kazzkiq/balloon.css

Simple tooltips made of pure CSS

CSSnpmMIT Licensetooltipcss
kazzkiq.github.io/balloon.css/
5k439
calimarkus/JDStatusBarNotification

Highly customizable & feature rich notifications. Interactive dismiss. Custom Views. SwiftUI. Tap-to-hold. Progress. Written in Swift, compatible for ObjC!

SwiftMIT Licensebannerios
calimarkus.github.io/JDStatusBarNotification/documentation/jdstatusbarnotification
4.3k564
skydoves/Balloon

:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android and Jetpack Compose.

KotlinApache License 2.0kotlinandroid
skydoves.github.io/Balloon/
4k310
ReactTooltip/react-tooltip

React Tooltip Component

JavaScriptnpmMIT Licensejavascriptreact
react-tooltip.com
3.8k528
Akryum/floating-vue

💬 Easy tooltips, popovers, dropdown, menus... for Vue

TypeScriptnpmMIT Licensetooltipvue
floating-vue.starpad.dev
3.5k342