All Projects β†’ calm β†’ Sexytooltip

calm / Sexytooltip

Licence: mit
The tooltip that has all the right moves

Projects that are alternatives of or similar to Sexytooltip

Modulz Original Design System Archive
An open-source design system for building scalable, responsive websites and applications.
Stars: ✭ 300 (+140%)
Mutual labels:  design, ui-components
Eva
πŸ’«Customizable Design System easily adaptable to your Brand.
Stars: ✭ 843 (+574.4%)
Mutual labels:  design, ui-components
Uix Kit
A free UI toolkit based on some common libraries for building beautiful responsive website, compatible with Bootstrap v4.
Stars: ✭ 318 (+154.4%)
Mutual labels:  design, ui-components
tooltip
[DEPRECATED] The tooltip that has all the right moves
Stars: ✭ 133 (+6.4%)
Mutual labels:  arrow, tooltip
Flutter dojo
A beautiful design and useful project for Building a flutter knowledge architecture
Stars: ✭ 1,192 (+853.6%)
Mutual labels:  design, ui-components
ColorPick.js
A simple and minimal jQuery color picker plugin for the modern web.
Stars: ✭ 48 (-61.6%)
Mutual labels:  design, ui-components
Material Sense
A React Material UI template to create rich applications with wizards, charts and ranges
Stars: ✭ 711 (+468.8%)
Mutual labels:  design, ui-components
Semantic Ui
Semantic is a UI component framework based around useful principles from natural language.
Stars: ✭ 49,729 (+39683.2%)
Mutual labels:  ui-components, tooltip
Ui Challenges
UI challenges by Semicolon, we accept challenges on twitter on #SemicolonChallenge
Stars: ✭ 69 (-44.8%)
Mutual labels:  design, ui-components
Android Expandicon
Nice and simple customizable implementation of Google style up/down expand arrow.
Stars: ✭ 871 (+596.8%)
Mutual labels:  ui-components, arrow
A17t
An atomic design toolkit for pragmatists
Stars: ✭ 236 (+88.8%)
Mutual labels:  design, ui-components
Class101 Ui
πŸ’…A React-based UI Component Library.
Stars: ✭ 102 (-18.4%)
Mutual labels:  design, ui-components
Light dark toggle
An awesome flutter app which artistically animates light and dark mode 😍
Stars: ✭ 175 (+40%)
Mutual labels:  design, ui-components
Easy Toggle State
A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.
Stars: ✭ 261 (+108.8%)
Mutual labels:  ui-components, tooltip
Citrus.avalonia
Modern styles for Avalonia controls.
Stars: ✭ 161 (+28.8%)
Mutual labels:  design, ui-components
Circlebar
A fun, easy-to-use tab bar navigation controller for iOS.
Stars: ✭ 513 (+310.4%)
Mutual labels:  design, ui-components
Zircleui
πŸš€ zircle-ui is a frontend library to develop zoomable user interfaces.
Stars: ✭ 870 (+596%)
Mutual labels:  design, ui-components
Patternfly Design
Use this repo to file all new feature or design change requests for the PatternFly project
Stars: ✭ 82 (-34.4%)
Mutual labels:  design, ui-components
Pg Calendar
πŸ“† beautiful and eidetic date picker
Stars: ✭ 109 (-12.8%)
Mutual labels:  design, ui-components
Components
Fully responsive and beautiful HTML components made with VueJS and TailwindCSS.
Stars: ✭ 121 (-3.2%)
Mutual labels:  design

SexyTooltip

The tooltip that has all the right moves.

It handles the gross complexity of view hierarchies and scroll view offsets. You just tell it which view to point at it'll do the rest! It'll even follow that view around the screen as it moves, re-shifting itself and its arrow to stay within the bounds of the window (or another superview you specify). Highly configurable yet super simple out-of-the-box.

It's pretty sexy.

facebook example motion example

Installation

Add pod 'SexyTooltip' to your Podfile or download the source here

Creation

The default initializer is to give the tooltip a content view which will be contained within the tooltip.

SexyTooltip *errorTooltip = [[SexyTooltip alloc] initWithContentView:self.errorLabel];

SexyTooltip can also be created with an NSAttributedString, which will create a UILabel as the tooltip's content view.

SexyTooltip *greetingsTooltip = [[SexyTooltip alloc] initWithAttributedString:greetingsText
                                                                sizedToView:self.view
                                                                withPadding:UIEdgeInsetsMake(10, 5, 10, 5)
                                                                  andMargin:UIEdgeInsetsMake(20, 20, 20, 20)];
[self.view addSubview:greetingsTooltip];

Presentation

The true beauty of SexyTooltip shines once you present it. No more dealing with nested CGRect logic and UIScrollView offsets. Just pass the view that you want the tooltip to point at, and even as that view moves around the SexyTooltip will continue pointing at the fromView (see the example video above)

[greetingsTooltip presentFromView:self.loginButton
                           inView:self.view
                       withMargin:10
                         animated:YES];

You can also present from a rect or point.

If you use a present method that doesn't explicitly pass inView, the fromView's direct superview will be used as the inView. The inView's bounds.size must be larger (width and height) than the ultimate bounds.size of the tooltip, otherwise there will be no way to place the tooltip.

Dismissal

Dismissal is as easy as calling -(void)dismiss; which defaults to animated dismissal. There's always [self.tooltip dismissAnimated:NO]; if you want to suck all of the joy out of your app ;)

Additionally, you can do [self.tooltip dismissInTimeInterval:10]; if you'd like to keep 'er showing for 10 seconds. Any other dismissals will cancel this timer, or you can do so yourself with [self.tooltip cancelDismissTimer];

Your tooltip will also be dismissed when it is tapped.

Appearance

The default is a nice sexy white with a subtle shadow and curved corners. You can change everything from hasShadow to arrowMargin to borderColor to padding to arrowHeight etc. All of these methods will maintain where your tooltip is currently pointing if they're called while it's showing.

Arrow direction

You can specify an array of permittedArrowDirections which specify the preference order of pointing directions. The tooltip will attempt to fit itself inside the inView you passed while maintaining the arrow pointing at the target view or point. For example, if you're pointing at a view that's moving around the screen, SexyTooltip will continue to be visible as the view moves to the edges by changing its direction in order to stay within the bounds of the inView. This is very powerful for complex tooltip scenarios or cases where you're not sure how the interface might look at the moment of presentation (e.g. variable text sizes)

typedef NS_ENUM(NSUInteger, SexyTooltipArrowDirection) {
    SexyTooltipArrowDirectionUp,
    SexyTooltipArrowDirectionDown,
    SexyTooltipArrowDirectionLeft,
    SexyTooltipArrowDirectionRight
};

Delegate

You can optionally hear about any of the following events as the delegate of your tooltip

@protocol SexyTooltipDelegate <NSObject>

@optional
- (void)tooltipDidPresent:(SexyTooltip *)tooltip;
- (void)tooltipDidDismiss:(SexyTooltip *)tooltip;
- (void)tooltipWillBeTapped:(SexyTooltip *)tooltip;
- (void)tooltipWasTapped:(SexyTooltip *)tooltip;

@end
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].