Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Logo

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/ Questions/Q 6754

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise Latest Questions

Author
  • 60k
Author
Asked: November 27, 20242024-11-27T09:29:08+00:00 2024-11-27T09:29:08+00:00

Considerations for Building Web Components

  • 60k

When building a web component, designing the component itself should start with examining considerations for its design, security, and accessibility. Considerations can vary based on what the component's eventual purpose, but common goals for web components include easy access and reusability. As such, major considerations could be the different properties a component might have, as well as the states the component can maintain and how much customization can be applied to it.

In my case, I'm currently working with my team to design an infographic card. The ultimate goal is for this to be a web component that can be modified based on a user's requirements, but maintains a fairly consistent layout and structure. The card will have a colored banner that includes an icon, title, and sub-title, as well as a content box beneath it to hold text. Major considerations for this card include how the card will resize based on different information inputted by a user, as well as what properties must be modified to ensure someone can customize the card to their specific use case.

Atomic Design

To ensure this card is reusable at every level, my team and I intend to utilize the principles of atomic design. This will allow us to break our larger card up into smaller components, which will then be combined to create a cohesive product. The following will be smaller “atoms” which will eventually become our molecule: a functioning card.

  1. The icon
  2. The banner (includes the icon, header text, and sub-header text)
  3. The skeleton of the card (a card that contains header and content sections)
  4. The complete card (a composition of the above atoms)

Difficulties

While atomic design is likely to help our team build this card efficiently and pay closer attention to the necessary requirements and considerations, there are nearly guaranteed to be bumps in the road. Responsive resize within a fixed area can be fairly difficult, and a major use case we'll be trying to account for is someone placing a multi-line title in the banner. Taking the time to design elegant adjustments to our banner component should, hopefully, result in a better card all-around.

Another consideration I had not immediately thought of is security. Even though we aren't accessing any user data or providing any sensitive data, the SVG (small vector graphic) format we'll be using for our card's icon is a known attack vector for embedded JavaScript attacks. As such, we need to make sure that a bad actor cannot misuse a valuable component of our card to harm users who interact with our product. This could reflect poorly on us and those using our component, not to mention the person whose information is made vulnerable by such an attack.

Lessons Learned

Having already built a web component, a button, I feel our team is coming into this project with a clearer understanding of how to interact with and build web components. The structure of LitElement was previously foreign to us, so our first project allowed us to strengthen our knowledge of how Lit works. In addition, I got much more comfortable with CSS during the first assignment. As our team made a circular button that responsively resizes based on its content, I was dealing with CSS I had never touched before. This ultimately pushed me to learn enough to maybe be dangerous, so I'm looking forward to taking those lessons with me into working on this card.

webdev
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 4k
  • Answers 0
  • Best Answers 0
  • Users 2k
  • Popular
  • Answers
  • Author

    ES6 - A beginners guide - Template Literals

    • 0 Answers
  • Author

    Understanding Higher Order Functions in JavaScript.

    • 0 Answers
  • Author

    Build a custom video chat app with Daily and Vue.js

    • 0 Answers

Top Members

Samantha Carter

Samantha Carter

  • 0 Questions
  • 20 Points
Begginer
Ella Lewis

Ella Lewis

  • 0 Questions
  • 20 Points
Begginer
Isaac Anderson

Isaac Anderson

  • 0 Questions
  • 20 Points
Begginer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Querify Question Shop: Explore Expert Solutions and Unique Q&A Merchandise

Querify Question Shop: Explore, ask, and connect. Join our vibrant Q&A community today!

About Us

  • About Us
  • Contact Us
  • All Users

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Help

  • Knowledge Base
  • Support

Follow

© 2022 Querify Question. All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.