All Projects → shipshapecode → Tether

shipshapecode / Tether

Licence: mit
A positioning engine to make overlays, tooltips and dropdowns better

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to Tether

Controlzex
Shared Controlz for WPF and ... more
Stars: ✭ 561 (-93.36%)
Mutual labels:  hacktoberfest, tooltips
Falcon
The no-nonsense REST API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
Stars: ✭ 8,654 (+2.49%)
Mutual labels:  hacktoberfest
Learning Nodejs
📖 An example-based Node.js tutorial.
Stars: ✭ 65 (-99.23%)
Mutual labels:  hacktoberfest
Webmonkeys
Massively parallel GPU programming on JavaScript, simple and clean.
Stars: ✭ 1,147 (-86.42%)
Mutual labels:  hacktoberfest
Envoy Control
Envoy Control is a platform-agnostic, production-ready Control Plane for Service Mesh based on Envoy Proxy.
Stars: ✭ 66 (-99.22%)
Mutual labels:  hacktoberfest
Vue Storefront
The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Ne…
Stars: ✭ 9,111 (+7.9%)
Mutual labels:  hacktoberfest
Psscriptanalyzer
Download ScriptAnalyzer from PowerShellGallery
Stars: ✭ 1,137 (-86.53%)
Mutual labels:  hacktoberfest
Vee Validate
✅ Form Validation for Vue.js
Stars: ✭ 8,820 (+4.45%)
Mutual labels:  hacktoberfest
Polybar
A fast and easy-to-use status bar
Stars: ✭ 9,604 (+13.74%)
Mutual labels:  hacktoberfest
Nvim Treesitter
Nvim Treesitter configurations and abstraction layer
Stars: ✭ 1,129 (-86.63%)
Mutual labels:  hacktoberfest
Kmon
Linux Kernel Manager and Activity Monitor 🐧💻
Stars: ✭ 1,142 (-86.48%)
Mutual labels:  hacktoberfest
Busy Beaver
The Chicago Python Community Engagement Slack bot
Stars: ✭ 66 (-99.22%)
Mutual labels:  hacktoberfest
Reflectioncommon
No description or website provided.
Stars: ✭ 8,627 (+2.17%)
Mutual labels:  hacktoberfest
Puppet System
Manage Linux system resources and services from hiera configuration
Stars: ✭ 65 (-99.23%)
Mutual labels:  hacktoberfest
Typeresolver
A PSR-5 based resolver of Class names, Types and Structural Element Names
Stars: ✭ 8,712 (+3.17%)
Mutual labels:  hacktoberfest
Hacktoberfest2020
Make your first Pull Request and earn a free tee from GitHub!
Stars: ✭ 1,141 (-86.49%)
Mutual labels:  hacktoberfest
Toonin
Technology that allows you to tune in to your friends and family in realtime using peer-to-peer sharing.
Stars: ✭ 67 (-99.21%)
Mutual labels:  hacktoberfest
Enhanced Github
🚀 Browser extension to display size of each file, download link and copy file contents directly to the clipboard
Stars: ✭ 1,146 (-86.43%)
Mutual labels:  hacktoberfest
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+0.11%)
Mutual labels:  hacktoberfest
Zaproxy
The OWASP ZAP core project
Stars: ✭ 9,078 (+7.51%)
Mutual labels:  hacktoberfest

Tether

npm version Download count all time npm npm bundle size Build Status Maintainability Test Coverage

🐙 Project status 🐙

We at Ship Shape have recently taken over Tether's maintenance and hope to modernize and revitalize it. Stay tuned for updates!

Install

npm

npm install tether

For the latest beta:

npm install tether@next

download

Or download from the releases.

Introduction

Tether is a small, focused JavaScript library for defining and managing the position of user interface (UI) elements in relation to one another on a web page. It is a tool for web developers building features that require certain UI elements to be precisely positioned based on the location of another UI element.

There are often situations in UI development where elements need to be attached to other elements, but placing them right next to each other in the DOM tree can be problematic based on the context. For example, what happens if the element we’re attaching other elements to is fixed to the center of the screen? Or what if the element is inside a scrollable container? How can we prevent the attached element from being clipped as it disappears from view while a user is scrolling? Tether can solve all of these problems and more.

Some common UI elements that have been built with Tether are tooltips, select menus, dropdown menus, and guided tours. Tether is flexible and can be used to solve all kinds of interesting problems; it ensures UI elements stay where they need to be, based on the various user interactions (click, scroll, etc) and layout contexts (fixed positioning, inside scrollable containers, etc).

Please have a look at the documentation for a more detailed explanation of why you might need Tether for your next project.

What to Use Tether for and When to Use It

Tether is a small, focused JavaScript library. For those who might be new to JavaScript, a library is simply a JavaScript file (or files) that contain useful JavaScript code to help achieve tasks easier and faster. Since Tether is a JavaScript user interface (UI) library, it contains code to help you to manage the way your website or web app appears.

Tether’s goal to is to help you position your elements side-by-side when needed.

Let’s say you’ve started working on your dream project—a fancy web app that’s sure to become the next big thing! An important feature of your new app is to allow users to comment on shared photos. However, due to limited vertical space and the overall layout of your new app, you’d like to display the comments next to the image, similar to how Instagram does it.

Your HTML code might look something like this:

<div class="container">
  <img src="awesome-picture.jpg" alt="Awesome Picture" class="picture">
  <div class="comments">
    ...
  </div>
</div>

Now, you could achieve this with some CSS using its position property, but going this route can be problematic since many of position’s values take elements out of the natural DOM flow. For example, if you have an element at the bottom of your HTML document, using position: absolute or position: fixed might could move it all the way to the top of your website in the browser.

Not only that, but you also have to make manual adjustments to ensure other elements aren’t negatively affected by the positioned elements. Not to mention, you probably want your comment box to be responsive, and look good across different device sizes. Coding a solution for this manually is a challenge all on its own.

Enter Tether!

After installing Tether and including it in your project, you can begin using it!

  1. In your JavaScript file, create a new instance (or constructor function) of the Tether object:

    new Tether({});
  2. Within the curly braces ({}) you can configure the library’s options. Tether’s extensive list of options can be found in the Tether documentation.

    new Tether({
      element: '.comments',
      target: '.picture',
      attachment: 'top right',
      targetAttachment: 'top left'
    });

Now you have a perfectly placed comment section to go with your awesome picture! It’ll even stay attached to the element when a user resizes their browser window.

There are tons of other useful features of Tether as well, instead of “comment boxes” you could also build:

  • Tooltips for useful hints and tricks,
  • Dropdown menus,
  • Autocomplete popups for forms,
  • and more!

Usage

You only need to include tether.min.js in your page:

<script src="path/to/dist/js/tether.min.js"></script>

Or use a CDN:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/js/tether.min.js"></script>

The css files are not required to get tether running.

For more details jump straight in to the detailed Usage page.

Tether Docs

Demo & API Documentation

Contributing

We encourage contributions of all kinds. If you would like to contribute in some way, please review our guidelines for contributing.

License

Copyright © 2019-2020 Ship Shape Consulting LLC - MIT License Copyright © 2014-2018 HubSpot - MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].