Franklin website designers
Hello and welcome to this website designers Web Designer Franklin video tutorial.
I’m Owen Corso from Google.
And today, we’re going to build a rich media expandable creative with video.
Let’s start by selecting file, New File.
This opens a dialog box where we will set up our ad.
First, let’s make out high of project.
We have four options– The default is Display & Video 360so we will leave that as is.
How I joined Google
I’m no color expert. Far from, actually. Throughout my career, I’ve depended on visual designers better than myself to produce an engaging palette and apply it harmoniously across a UI.
Yet, as a systems designer, I’m often in the position to provoke and validate color decisions as a system takes shape. Here’s a 16 lessons I’ve learned while stabilizing a primary palette, tint and shade choices, secondary palettes, and solving for accessible contrast.
By primary, we’re talking colors used everywhere including your brand colors, neutrals, and a typically interactive digital blue.
#1. Stabilize Brand Colors Quickly
︎Every organization has one, two, or no more than a few core brand colors. THE red. THE blue. THE orange. Settle on them. Even if reasonably set up with a color variable or two, nothing signals a design system team that can’t get their act together than constantly changing primary colors.
Takeaway: Decide your essential brand colors early, because they spread widely, quickly.
#2. Involve Brand (If You Alter a Brand Color)
Is brand blue a bit dull? Can’t resist the urge to liven it up? Nothing poisons early collaboration more than a casual “We saturated the brand orange for web” followed by brand reacting with “You did what?” Oh the sacrilege!
Takeaway: Brand colors are the brand team’s territory. So discuss adjustments with them and defer to their judgment as needed.
#3. Drop the Neutral Neutrals
From dark-as-night charcoal to fluffy light gray, neutrals provide essential UI scaffolding. Loading a system with neutrals, even a few, risks giving teams access to muddy colors. They can also lead to “wireframey” designs. And, neither dark nor light type has sufficiently accessible contrast on a medium gray background.
Takeaway: Provide a few light grays and a few dark grays to achieve useful contrast, but don’t get wishy washy wireframey. Consider avoiding medium grays in between.
#4. Go “Digital Blue.” Everybody Else Does.
My past five design systems settled on a saturated blue as a default button and link color. Links have always been blue, perhaps since the dawn of the first browser. This “Digital” blue, a utility color for links and clickable items, is essential in any core palette.
Takeaway: When (not if 😉 ) you go with your “Digital Blue,” choose an accessible one and make sure it doesn’t clash with the brand’s own blue, or red, orange, purple, or green.
Tints & Shades Per Color
You can’t have just a few colors and call it a day, right? System users often need to tune a color choice across a range, reuse with ease, and know their boundaries.
#5. Stack the Tint & Shade Range, Per Color
Color palette display patterns long predate the web. Yet I still love me a compactly arranged tint stack. They can be just…gorgeous. The best stacks visualize more than just a color, combining its name with HEX codes, code variables, and other indicators (such as prohibiting overlaid type). A quick scan is all you need.
Takeaway: Stack available colors in each hue, and treat the stack as a visualization to include important details compactly.Material Design’s Indigo and Deep Orange
#6. Name Tints & Shades by Brightness
We’ve all been there. A month into the system, the neutrals $color-gray-1, $color-gray-2, … , $color-gray-7 — are stable. And then, in a stroke, you’ve got another tint to add stuck between -1 and -2. That numbering system stinks.
Takeaway: Scale color names between 0 and 100 based on brightness, such as $color-gray-05 and $color-gray-92. The scale reflects a familiar range from dark to light, allows for injecting new options between, and heck if I won’t remember $color-gray- 93 until we retire it later.
#7. Limit Tint & Shade Quantity
At the core of a good system is choice without endless options, a stable aesthetic to serve as a starting point. Odds are, you aren’t Material Design, intended to serve countless products. In most cases, a design system need not offer boundless choices. The more choices you provide, the tougher it’ll be to control harmonic combinations and a consistent feel across applications.
Takeaway: Offer a handful of options and avoid tedious variety. Empower system users with just enough choice: more than a single option, but only up to a few intentional choices.
#8. Tell Me How To Transform: Hand-Pick or Functionally
Modern tools like SASS and Stylus offer transformation functions like darken and lighten to shift a color by a brightness percentage. These handy tools enable a you to alter a color for subtle contrasts like a hovered button or tiered navigation.
But transforms can be troublesome: carefully crafted base colors can become inaccessible alternatives (see below), a page’s overall palette can muddy, or a “5% system” that works on moderately bright colors yields insufficient contrast for a very light or dark case.
Takeaway: Deliberately allow — or avoid — color transformations in your system. If you endorse the practice, then offer examples of when and how to do it effectively in your system, such as 5–10% for moderately bright cases and 10–20% in more extreme cases. If transformations should be avoided , document that succinctly.
Beyond the brand colors and their variants, well-considered color systems array the broader variety of colors reserved for varied purposes.
#9. Define Meaningful Sets Like Feedback Colors
Most systems reserve a certain red for errors, green for success, yellow for warning, and (possibly a lighter sky) blue for informational messages. Feedback color is critical, because it’s positioned at the top of the page interacting with other key components and/or encountered as a result of an unwelcome circumstance. Without system guidance, such messages become embedded in product code, the result of product teams solving a challenge quickly and moving on.
Takeaway: Explore and define the standard feedback colors and other relevant sets to ensure that colors fit harmoniously rather wedging them in later or having teammates recall “I just grabbed it from Google.”Typical feedback colors: success, warning, error and informational
#10. Illustrate Theme Variety
In some systems, color use is customized per product, section, or brand. Often, this may be a result of relating a master brand (think, Marriott International) to its sub-brands (think Courtyard Hotels, Ritz Carlton, and Moxy Hotels). Or it’s a prefab themes like Ambient Warmth and Frozen Blue. Maybe the user is complete control, and you need to illustrate the breadth of (all the havoc of) what they can do.
Takeaway: Reveal the range of themes available compactly, and set boundaries around allowable theme colors in certain contexts.Theme colors for multiple Marriott.com hotels, derived from product pages
#11. Define How Theming Works
It’s not enough to simply say “Go ahead and theme it!” A theme color may apply to predictable accents throughout a UI such as button background-color, active tab background-color, or a primary navigation’s thick border-top. Just as important, theme colors may be forbidden from altering other bits, such as long form type or — yikes! — a link color that ends up invisible.
Takeaway: Identify how theming works, particularly via reference to specific UI element properties in play. Just as important, articulate which — if not most — elements are off limits.
#12. Avoid Guiding on Color-Mixing Until (At Least) Dust Settles
One of my favorite all time design system tools is Google’s MDL Color Customizer, which enables users to combine primary and secondary UI colors effectively. It’s so easy, and the outcome so helpful. Yet, the system teams I work with either don’t want to provide this kind of flexibility or lack the time and care necessary to solve such a combinatoric challenge.
Takeaway: Avoid the rabbit hole of solving for a vast array of color combinations unless it’s a core system value. In most cases, system users will pair up their own combinations or benefit from a tool more dedicated to doing just that. Help them propagate their choice rather than solving for every combination they may consider. That experimentation is their job.Serve users of your system by making it efficient to propagate their choice through a product, rather than making the choice for them.
Contrast & Accessibility
Solving for accessible color contrast should a core practice of setting up any digital color system from the get go. However, design can be tumultuous place, and teams can lose sometimes. Or some members don’t know about accessibility. Or they simply don’t prioritize it.
A systems team can engrain accessible practices into a workflow to provoke and spread values in accessibility broadly across an enterprise.
#13. Check Contrast Early & Ritually
It happens often: a few weeks or days before a product — or design system — launch, finally somebody notices. The design team hasn’t taken necessary care to ensure the primary and secondary color palette is being applied in a way to meet WCAG 2.0 color contrast of 3.0 (for large, heavier type) or 4.5 (for standard type). So designers — and then, their developers — scramble to determine fixes and inject it into the code.
Takeaway: Any system designer responsible for color must be familiar with WCAG 2.0 rules, have a tool (like Tanaguru) to test color pairs, and incorporate the practice into color selection.Tanaguru, one of many accessibility calculators online
#14. Explore Accessible Color Choices Across Ranges
A drawback of WCAG guidelines is its stark threshold: a color pair passes or fails. This leaves designers yearning for more, but worse leaves stakeholders flummoxed at how bad the color pair fails and how much it needs to change.
Conversation quickens when we reveal a spectrum of choices, with the pass/fail line fairly evident. This transforms the process from trial and error to tuning a dial. Before, it was “That pair failed. Let’s try again.” Now, it’s an enlightening “Oh, so that’s how dark the blue needs to be” followed by a rational discussion to balance visual tone, brand identity, and accessibility sensitivities.
Takeaway: When exploring accessible color contrast, show a range of choices to help a team select a color that passes the test.Exploring neutral and interactive colors by showing multiple choices across a range
#15. Solve the Reverse Light on Dark and Dark on Light
When creating a system, it’s up to the systems designer to be mindful of and solve for the entire range of choices on offer. It’s not enough to just test for accessibility problems as they arise. Instead, a color palette should be thoroughly reviewed prior to publishing a system for reuse.
This is especially true for reverse color treatments. It’s very common for a system to default to dark text on a light background. However, most find themselves reversing color treatments, whether a black and white on light and dark neutrals or tints of another primary or secondary color.
Takeaway:Solve for and recommend reversed pairings to adopt or avoid.A table of calculated contrast (using a SASS function) between neutral backgrounds and interactive blue alternatives
#16. Use Color to Provoke Broader Accessibility Awareness
Color is fundamental to a system, and accessible color contrast is fundamental to color. This injects accessibility smack dab into the middle of a system’s formation. People that matter are paying attention: brand managers, design leads, developers, and execs. What a wonderful opportunity to use color to open a door to the broader array of accessibility considerations.
Takeaway: Seize the opportunity to advocate for accessibility. Always be probing a collaborator’s knowledge of accessibility (or lack thereof) and educate and advocate all you can.
Franklin website designers
Next, we can select the type of ad.
We want to make an expandable, so we select Expandable on the left.
Next, we can set again ad’s dimensions.
We are building a 320 by 50that expands to 480 by 250.
So I will make those changes.
We then assign the Franklin creative a name.
I will leave my Save ToLocation as the default, and leave the talk about set to Quick.
Once I’m happy with my settings, I click OK.
Google Web Designer creates the initial pages of the ad for me with the dimensions I defined.
The collapsed page already contains a Tap Area event to expand the ad and an expanded pageFranklin with a close tap area to collapse back down.
Latest Dental Implants To Be Used
This reading list is for anyone who wants to learn or deepen their knowledge in the disciplines of User Research, Usability, Information Architecture, User-Interface Design, Interaction Design, Content Strategy or Experience Strategy.
The list is broad and includes books that exemplify design thinking, processes, methods, principles and best practices. Some of the books on this list are over 20 years old, yet still relevant more than ever.
There’s not a day where I don’t find myself applying the ideas from these books. Each has helped shaped the designer I am today, helped me advance my craft. I hope that you too, can extract the same value.
Last updated 09/10/2017
My Top Ten
- The Design of Everyday Things, Donald Norman
- About Face: The Essentials of Interaction Design, Alan Cooper
- The Elements of User Experience: User-Centered Design for the Web and Beyond, Jesse James Garrett
- The User Experience Team of One: A Research and Design Survival Guide, Leah Buley
- Manage Your Day-to-Day: Build Your Routine, Find Your Focus, and Sharpen Your Creative Mind, Jocelyn K. Glei, 99u
- A Practical Guide to Information Architecture, Donna Spencer
- Designing Together: The collaboration and conflict management handbook for creative professionals, Dan M. Brown
- Seductive Interaction Design: Creating Playful, Fun, and Effective User Experiences, Stephen Anderson
- 100 Things Every Designer Needs to Know About People, Susan Weinschenk
- Lean UX: Applying Lean Principles to Improve User Experience, Jeff Gothelf and Josh Seiden
More Must-Reads On Thinking, Methods, Principles and Best Practices
I find it helpful to choose what to read based on what’s relevant at the time. Applying what you’re reading, as you’re thinking and making is a great way to solidify concepts, reflect and learn.
Some old, some new. All important reading, in no particular order.
Last updated 09/10/2017
- The Shape of Design, Frank Chimero
- Mental Models: Aligning Design Strategy with Human Behavior, Indi Young
- Practical Empathy: For Collaboration and Creativity in Your Work, Indi Young
- Interviewing Users: How to Uncover Compelling Insights, Steve Portigal
- Designing Web Interfaces: Principles and Patterns for Rich Interactions, Bill Scott, Theresa Neil
- The Laws of Simplicity (Simplicity: Design, Technology, Business, Life), John Maeda
- Information Architecture for the World Wide Web: Designing for the Web and Beyond, Peter Morville, Louis Rosenfeld, Jorge Arango
- Sketching User Experiences: The Workbook, Saul Greenberg, Sheelagh Carpendale , Nicolai Marquardt, Bill Buxton
- Well Designed: How to Use Empathy to Create Products People Love, Jon Kolko
- Thoughts on Interaction Design, Jon Kolko
- Linchpin: Are You Indispensable?, Seth Godin
- Don’t Make Me Think AND Rocket Surgery Made Easy, Steve Krug
- Designing Interfaces, Jennifer Tidwell
- Handbook of Usability Testing: How to Plan, Design, and Conduct Effective Tests, Jeffrey Rubin, Dana Chisnell
- Designing Interactions, Bill Moggridge
- The Visual Display of Quantitative Information AND Envisioning Information, Edward R. Tufte
- A Project Guide to UX Design: For user experience designers in the field or in the making, Russ Unger & Carolyn Chandler
- Gamestorming: A Playbook for Innovators, Rulebreakers, and Changemakers, Dave Gray, Sunni Brown, James Macanufo
- The Mobile Frontier: A Guide for Designing Mobile Experiences, Rachel Hinman
- Design Is the Problem: The Future of Design Must be Sustainable, Nathan Shedroff
- Prototyping: A Practitioner’s Guide, Todd Zaki Warfel
- Making Meaning: How Successful Businesses Deliver Meaningful Customer Experiences, Steve Diller, Nathan Shedroff, Darrel Rhea
- Content Strategy for the Web, by Kristina Halvorson, Melissa Rach
- Just Enough Research, Erika Hall
- Design Is A Job, Mike Monteiro
- Designing for Emotion, Aaron Walter
- Creative Workshop: 80 Challenges to Sharpen Your Design Skills, David Sherwin
- Letting Go of The Words: Writing Web Content that Works, Janice (Ginny) Redish
- Designing the Obvious: A Common Sense Approach to Web Application Design, Robert Hoekman Jr
- Designing the Moment: Web Interface Design Concepts in Action, Robert Hoekman Jr
- Designing for the Social Web, Joshua Porter
- Undercover User Experience Design, Cennydd Bowles, James Box
- Product Design for the Web: Principles of Designing and Releasing Web Products, Randy Hunt
- Designing the User Interface: Strategies for Effective Human-Computer Interaction, by Ben Shneiderman, Catherine Plaisant, Maxine Cohen, Steven Jacobs
- This is Service Design Thinking: Basics, Tools, Cases, Marc Stickdorn, Jakob Schneider
- Resonate: Present Visual Stories That Transform Audiences, Nancy Duarte
- Metaskills: 5 Talents for the Robotic Age, Marty Neumeier
- The Brand Gap: How to Bridge the Distance Between Business Strategy and Design, Marty Neumeier
- Getting Real AND Rework, 37 Signals, Jason Fried, David Heinemeier Hansson
- The Humane Interface: New Directions for Designing Interactive Systems, Jef Raskin
- Simple and Usable Web, Mobile, and Interaction Design, Giles Colborne
- Search Patterns: Design for Discovery, Peter Morville, Jeffery Callender
- Emotional Design: Why We Love (or Hate) Everyday Things, Don Norman
- Neuro Web Design: What Makes Them Click? Susan Weinschenk
- Designing for the Digital Age: How to Create Human-Centered Products and Services, Kim Goodwin
- A Web For Everyone, Sarah Horton, Whitney Quesenbery
- How to Make Sense of Any Mess, Abby Covert
- Radical Focus: Achieving Your Most Important Goals with Objectives and Key Results, Christina Wodtke
- Org Design for Design Orgs: Building and Managing In-House Design Teams, Peter Merholz, Kristin Skinner
- Communicating Design: Developing Web Site Documentation for Design and Planning, Dan M. Brown
- Subject To Change: Creating Great Products & Services for an Uncertain World, Peter Merholz, Todd Wilkens, Brandon Schauer, David Verba
- Hooked: How to Build Habit-Forming Products, Nir Eyal
- The 46 Rules of Genius: An Innovator’s Guide to Creativity, Marty Neumeier
- Sprint: How to Solve Big Problems and Test New Ideas in Just Five Days, Braden Kowitz, Jake Knapp, and John Zeratsky
- Designing with Data: Improving the User Experience with A/B Testing, Rochelle King, Elizabeth F Churchill, Caitlin Tan
- Banish Your Inner Critic: Silence the Voice of Self-Doubt to Unleash Your Creativity and Do Your Best Work, Denise Jacobs
- Design for Real Life, Eric Meyer & Sara Wachter-Boettcher
- Designing Interface Animation: Meaningful Motion for User Experience, Val Head
- Practical Design Discovery, Dan Brown
- On Web Typography, By Jason Santa Maria
- Designing Voice User Interfaces: Principles of Conversational Experiences, Cathy Pearl
- Thinking in Systems: A Primer, Donella H. Meadows
- Creative Confidence: Unleashing the Creative Potential Within Us All, Tom Kelley, David Kelley
More Useful Reading
Reading books is only a partial source of my inspiration and learning. I also frequently read blogs and articles. I highly recommend staying connected to these sources of great thought leadership:
- Eleganthack, Christina Wodtke
- Peter Merholz
- The Year of the Looking Glass, Julie Zhuo
- Bokardo, Joshua Porter
- Information Architects, Oliver Reichenstein
- Felt Presence, Ryan Singer
- Whitney Hess
- Disambiguity, Leisa Reichelt
- Form and Function, Luke Wroblewski
- Frank Chimero
- Aral Balkan
- David Cole
- Seth Godin
- Scott Berkun
- Google Ventures Design Library
- Adaptive Path
- Boxes and Arrows
- UIE Brainsparks
- UX Magazine
- UX Booth
- A List Apart
- Smashing Magazine
- Signal vs. Noise, Basecamp
- 52 Weeks of UX
If you’ve found this article helpful, I would love to hear about it. Comment, tweet me or reach out to share your story: firstname.lastname@example.org
Get My Newsletter
Subscribe to my mailing list and I’ll keep you updated with my latest writing. I’m trying to publish something every 2 months on design thinking and other enriching ideas to help you live a more productive and enjoyable work life.
💸 How to budget for your web design project 💸 - Web Design is Broken e05
Concluding with this series of tutorials, we will see now How To Solve A 4x4x4 Rubiks Cube.
The main purpose of the series, is that you learn in a much more effective way how to solve the Rubik's cubes.
We have seen that the resolution of the Junior Cube it's a subset of the steps for the resolution of Standard Cube.
We will see now that in the case of 4x4 Rubik's Cube (and bigger cubes), the method of resolution of the Standard Cube is the base of resolution of more complex cubes.
A way to solve more complex Rubik's Cubes is accomplished through using what is commonly called the 3x3x3 reduction method.
In this method it is necessary that you know how to solve the Standard Cube. If you need to learn how to solve the Standard Cube, please read 'How To Solve A 3x3x3 Rubiks Cube'.
For simplicity this tutorial is divided in four pages, in this first page terms are defined and the method is described.
Table Of Contents• How to solve a 4x4x4 Rubiks Cube • Pieces and Faces • Aditional Faces • Turn Of An Internal Face • Description Of The Algorithm • Step 1, Solving The Centres • Step 2, Pairing up the Edges • Step 3, Finishing the Cube • The Color Scheme • Swapping Two Opposite Centres • Solve A 4x4x4 Rubiks Cube • Step 1, Solving The Centres • I] First White Row • II] First Yellow Centre • III] Finishing the White Centre • IV] Concluding The Centres • Step 2, Pairing up the Edges • Pairing, Case A • Pairing, Case B • Step 3, Finishing the Cube • Last Layer Edges Parity Error • Incomplete Line • Incomplete Cross • Top Layer Edges Parity Error • Opposite Dedges • Adjacent Dedges • Top Layer Corners Parity Error • Corners In Line • Corners In Diagonal
How To Solve A 4x4x4 Rubiks Cube
In order to understand How To Solve A 4x4x4 Rubiks Cube, you need to be familiar with the notation. If you don't know it, please read 'How to solve a Rubiks Cube' before continuing.
For the purposes of the following tutorial, a series of colors will be chosen for the faces, you can choose others.
Pieces and Faces
- Corner ..- a physical corner piece. A corner piece has three sides. There are eight corners.
- Edge .....- a physical edge piece. An edge piece has two sides. There are twenty four edges.
- Centre ...- a physical centre piece. A centre piece has one side. There are twenty four centres.
- Face .....- a side of the cube. There are six external faces and six internal faces.
A 4x4x4 Rubiks Cube has internal faces, they are named with a lowercase letter.
- Internal Upper Face - u
- Internal Down Face - d
- Internal Left Face - l
- Internal Right Face - r
- Internal Front Face - f
- Internal Back Face - b
Turn Of An Internal Face
In a 4x4x4 Rubiks Cube, the internal faces can turn.
To facilitate the turn (and the notation) of an internal face, this is rotated together with the outer face.
See the difference in the following examples of a clockwise turn of the External and the Internal Upper Face (also note the double arrow, which denotes to turn two faces).
How To Solve A 4x4x4 Rubiks Cube - Description Of The Algorithm
The algorithm is divided in three steps.
Step 1, Solving The Centres
The first step in the solution is to solve the 4 Centre Pieces on each face of the cube.
Step 2, Pairing up the Edges
The next step is to Pair up the 24 Edges into 12 distinct Double Edge Pairs (Dedges)
Step 3, Finishing the Cube
When you have solved the Centres and Paired up the Edges, you should see your 4x4x4 Rubik Cube like a 3x3x3 Rubik Cube.
You can finish off the cube in the same way as a 3x3x3.
The Color Scheme
The 4x4x4 Rubiks Cube is an even cube and has no fixed Centre pieces to refer to.
There is no quick way to determine which color goes where in relation to the others. It is helpful to have a color scheme memorised:
Standard Color Scheme
- Yellow opposite White
- Blue opposite Green
- Red opposite Orange
If your cube is scrambled (or it doesn't have the standard color scheme), there is an easy way to determine the scheme.
Simply solve the corners of your 4x4x4 (assuming that you can solve the Corners of a 3x3x3).
Once you've figured out your colour scheme, memorize it or write it down.
Swapping Two Opposite Centres
At some point in your 4x4x4 Rubik Cube solving it is possible that you make a mistake with your Centres, such as transposing two Opposite Centres.
There is an easy way to fix it.
How To Solve A 4x4x4 Rubiks Cube - Algorithm
Now that you understood the method, it is time to put in practice.
Begin with the first step: Solving The Centres.Make money writing about your passions. Join HubPages ________________________________________________________________ Acknowledgement : Table Of Contents by Darkside ________________________________________________________________
Ant (GitHub) is much more than a React UI kit with a minimalist design aesthetic and every component under the sun. It is a rabbit’s hole that leads to a giant maze of interconnected libraries, with a serious ecosystem surrounding it. There’s a custom build tool based on Webpack called ant-tool, several CLI apps, community scaffolds, and a complete framework (dva, which has its own CLI as well). And the UI components are mini-projects in and of themselves — see this repo for information on each component.
Many of these libraries appear to be very polished, including an entire React animation library. And I’d love to learn more about them, but Ant comes with a challenge — the majority of the documentation is in Chinese.
How’s Your Chinese?
Let me preface this by pointing out that the components library and its terrific style guide have been translated into English by generous volunteers, so the UI kit is completely usable. And the translation effort demonstrates the project’s intentions to open up Ant to a wider audience, boding well for companies considering adopting it.
However, there are some language issues that remain. The English is sometimes confusing or obscure. The maintainer of the library has commented here that they welcome PRs for improving the documentation, so that could be a great way to get involved in this amazing project.Good luck hunting down issues!
Another issue is that issues in Ant.Design are mostly filed and debated on GitHub in Chinese. This could be a deal breaker for enterprise applications, but I’m not sure it should be one for early startups since Ant can be used quite minimally, without making use of smarter features like built-in form validation. Still, if you find an issue or bug with the library, it will be difficult to research previous solutions to your issue, and that’s why I recommend making minimal use of the surrounding ecosystem at this stage.
Popular UI libraries for React include Material-UI, Semantic-UI, Foundation, and Bootstrap (this and this), and they are all fairly mature. Material-UI should be singled out as it massively eclipses the others in popularity, with over 22k stargazers — and over 600 open issues. But it turns out that Ant.Design is a surprisingly worthy candidate as well. It’s battle tested by some of the most well-trodden sites on the web (Alibaba, Baidu), and it boasts a brilliant style guide, custom tooling, and, of course, a comprehensive catalogue of components. It also has only 85 open issues at the time of writing, which is a good thing considering its popularity.
So let’s take a tour of the library, see what it has to offer, and how to get started using it.
The Ant components list is dizzying. Sure, it contains the basics — modals, forms (inline and vertical), navigation menus, a grid system. But it also contains a ton of extras, such as a @mentioning system, a timeline, badges, a seriously nice table system, and other small fancy features, such as an involved address box (see the Habitual Residence field). Have a look — it has everything that a modern web application should, with a tasteful, minimalist aesthetic.
There’s a nice, concise section in the documentation on the guiding principles of Ant.Design. I found it a great read as it got me thinking a lot about UI/UX considerations, especially the “Provide an Invitation” section, where they discuss different ways of making interactions discoverable by a user. By the way, if anyone can recommend me a good book on UX, I would be grateful.
The Ant layout system is comprised of a 24-aliquot (a great new word that I learned from the translated documentation — it means parts of a whole) grid and a separate Layout component than you can choose to use. The grid uses the familiar Row/Col system, but you can also specify a prop called flex which allows you to harness Flexbox properties to define a responsive UI. (See a previous blog post of mine for help grokking the Flex standard.)
Flexbox is now fully supported on just about every browser (with partial support on IE 11 as well as some older mobile browsers), so it should be fine to use. If your customer base is largely Internet Explorer users, which does happen in some industries or countries, you would be wise to abstain from using flex Rows or the Layout component, as Layout is built strictly on Flexbox.
Layout includes components for a Sider, Header, Content, and Footer. Again, these are strictly based on Flexbox, so there’s no choice here — but to be honest I’m not sure what these components give you on top of using the standard Row/Col grid system, aside from a couple extra props you can make use of and possibly some built-in design choices. All in all, it doesn’t seem to me to be hugely useful.
Col elements can be supplied with a span prop to define how many aliquots a column takes up and an offset prop to define an optional offset; Row can take a gutter prop to define space between columns in a row (in pixels, not aliquots).
Here’s a UI example from a side project of mine. It contains one row with two columns:
The code would look something like this:
Ant does not let you down as far as forms are concerned, with options for inline, horizontal, and vertical forms, amazing select boxes, and clear validation messages and icons. In fact, it goes a little overboard here. It allows you to wrap your entire form-rendering component in a higher-order component à la Form.create()(<Component />) to gain access to a built-in validator syntax and custom two-way-binding system (cue audible lip biting). You can then specify standard rules such as ‘required’, or supply custom validator methods. (What are Higher Order Components? Check out this excellent post by James K. Nelson.)
Do you need to use their HOC? Absolutely not, and I’m not sure you should. As I said above, going down that path could expose you to language risk should you encounter bugs and I don’t see why you would want to use a custom two-way binding data system anyway. But you could easily use the HOC and just not use the two-way data binding.
Au Naturel — Plain React Forms
So let’s go over how to use the Ant validation messages without using their higher-order component.
Ant gives us three props that we can supply to each Form.Item component to display validation messages or icons:
- validateStatus — This determines the colour & icon scheme of the validation message (see photo above) — valid options are success, warning, error, and validating.
- help — The validation message to display.
- hasFeedback — This is one of them props that don’t require a value. Just include if you want to display the associated icon, and it defaults to true.
Here’s an example of a simple form element that displays a validation message:
Notice that I used the long-form Form.Item component name. You can make yourself a shortcut for this and any other Ant sub-components as follows:const FormItem = Form.Item;// .. allows you to use:
Form Validation using the Ant Higher-Order Component
Now what if we do want to make use of the Ant Form decorator? It’s fairly straightforward to implement. Create your React component class, and then pass it as an argument to Form.create(). The component can then be exported:class SomeComponent extends React.Component
render() <place_form_here.. />
FancyFormComponent = Form.create()(SomeComponent);export FancyFormComponent as default ; // imported as SomeComponent
Inside your form, decorate your Input fields using the getFieldDecorater method, which exposes a ton of extra props on your component. You can now manipulate form elements directly from the props (eek!).
This example in the documentation gives a thorough demonstration on using the complete higher-order component.
Interactive Components — Message (Alert)
Ant provides a number of other components that give web applications a high degree of interactivity. A great example is alerts — or messages, as they’re called in Ant. Adding an alert is as simple as calling message.success('Great! Item has been saved.') in your component. Message types include success, warning, or error. Just don’t forget to import message (lowercase) from ‘antd’.Minimalism at its Best
As I mentioned above, you can either go all-in on the Ant ecosystem (with its custom Webpack adapter), or just opt for the design framework. I went with the latter and I suspect you might too, not the least because using other parts of the ecosystem could require a working knowledge of Chinese. But I’ll cover both options.
Option 1 — Use the CLI
Ant comes with antd-init, a CLI for generating a complete React application with Ant installed. I do not recommend this route for non-Chinese speakers, but if you want to try it, getting started is easy. Just install the CLI using npm, create a new folder, and run antd-init:npm install antd-init -g; mkdir demo-app; cd $_; antd-init;
You will then be greeted by the following message:antd-init@2 is only for experience antd. If you want to create projects, it’s better to init with dva-cli. dva is a redux and react based application framework. elm concept, support side effects, hmr, dynamic load and so on.`
It’s a rabbit’s hole. Open your new application and you will see that your familiar webpack.config.js file is no longer familiar — the CLI uses ant-tool, a “Build Tool Based on Webpack” that I mentioned above. The documentation is in Chinese, but it appears to set common defaults for Webpack and then allow you to just supply values that you want to override. Here’s what the config file looks like:// Learn more on how to config.
// — https://github.com/ant-tool/atool-build#配置扩展module.exports = function(webpackConfig)
]); return webpackConfig;
The index.js contains a lovely demo page that uses the understated Ant styling.
Option 2 — Use Standard Webpack
This would be my preferred route, but it can be more complicated getting your Webpack settings right at first. The Getting Started page includes some good instructions. First install Ant in your React app:$ npm install antd --save
Ant recommends using their own babel-plugin-import in your .babelrc:"presets": [
"plugins": ["transform-decorators-legacy", ..., ["import", [ libraryName: "antd", style: "css" ]]
Make sure your Webpack includes loaders for .js and .css files, and you should be good to go. To use an Ant component, import it in the module file. E.g.import Row, Col, Icon, Button from 'antd';
There’s no doubt that Ant has a lot to offer as a UI framework, with a formidable catalogue of components and a serious ecosystem around it. It does, however, come with some risk. If you experience an issue with the library, you may be stuck communicating in Chinese. Ultimately I recommend trying it out if you like the minimalist aesthetic, while keeping usage of the peripheral Ant ecosystem to a minimum.