Experiment with various UI components and see how styling affects their appearance and behavior
In this lab, you'll practice styling various UI components. For each section:
Note: Some basic styles are provided, but you need to implement the component styles yourself.
Cards are versatile containers for displaying content composed of different elements.
This is a basic example of a card component with an image and some text content.
Cards can contain various content types like images, text, buttons, and more (Your imagination is the limit).
This card doesn't have an image but still provides a clean container for your content with a clear call to action.
Buttons allow users to take actions and make choices with a single tap.
Chips are compact elements that represent an input, attribute, or action.
Sliders allow users to select a value from a range by moving a thumb along a track.
Switch buttons toggle the state of a single setting on or off.
Lists present multiple line items vertically as a single continuous element.
Forms allow users to enter and submit data through various input types.
Tables are used to display structured data in rows and columns.
Name ↕ | Email ↕ | Role ↕ | Status ↕ | Actions |
---|---|---|---|---|
Wilfried Kongolo | wkongolo@nust.na | Admin | Active | |
Jane Smith | jane@example.com | Editor | Active | |
Josephine Muuntumo | jmuuntumo@nust.na | Author | Pending | |
Sarah Williams | sarah@example.com | Subscriber | Active |
Alerts display important messages to users with different severity levels.
Progress bars show the completion status of a task or process.
45% Complete
70% Complete
30% Complete
Pagination divides content into separate pages and allows navigation between them.
Breadcrumbs show the current page's location within a navigational hierarchy.
Tooltips display additional information when users hover over an element.
Hover over the following text to see a tooltip: Tooltip exampleThis is a tooltip
Accordions allow users to toggle the display of sections of content.
HTML (HyperText Markup Language) is the standard markup language for documents designed to be displayed in a web browser.
CSS (Cascading Style Sheets) is a style sheet language used for describing the presentation of a document written in HTML.
JavaScript is a programming language that enables interactive web pages and is an essential part of web applications.
Modals are dialog boxes/popup windows that are displayed on top of the current page.
Here are some CSS code snippets for the components you've seen:
Learn how to customize the appearance of web components using CSS variables and properties.
CSS variables (custom properties) allow you to define reusable values throughout your stylesheet:
Box shadows add depth and dimension to elements:
Transitions create smooth animations between state changes: