uikit
A lightweight and modular front-end framework for developing fast and powerful web interfaces
Top Related Projects
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
A utility-first CSS framework for rapid UI development.
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
Modern CSS framework based on Flexbox
Semantic is a UI component framework based around useful principles from natural language.
A minimalist CSS framework.
Quick Overview
UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. It provides a comprehensive collection of HTML, CSS, and JS components that are flexible, responsive, and easy to customize. UIkit is designed to be simple to use while offering advanced features for creating modern and attractive websites.
Pros
- Lightweight and fast-loading, with a small footprint
- Highly customizable with SASS variables and mixins
- Extensive collection of pre-built components and layouts
- Responsive design with mobile-first approach
Cons
- Less popular compared to other frameworks like Bootstrap, potentially leading to a smaller community and fewer resources
- Steeper learning curve for developers unfamiliar with its specific syntax and conventions
- Some users report occasional inconsistencies in documentation
Code Examples
- Creating a responsive grid:
<div class="uk-grid-match uk-child-width-1-2@s uk-child-width-1-3@m" uk-grid>
<div>
<div class="uk-card uk-card-default uk-card-body">Item 1</div>
</div>
<div>
<div class="uk-card uk-card-default uk-card-body">Item 2</div>
</div>
<div>
<div class="uk-card uk-card-default uk-card-body">Item 3</div>
</div>
</div>
- Adding a responsive navigation bar:
<nav class="uk-navbar-container" uk-navbar>
<div class="uk-navbar-left">
<ul class="uk-navbar-nav">
<li class="uk-active"><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>
- Creating a modal dialog:
<button class="uk-button uk-button-default" uk-toggle="target: #my-modal">Open Modal</button>
<div id="my-modal" uk-modal>
<div class="uk-modal-dialog uk-modal-body">
<h2 class="uk-modal-title">Modal Title</h2>
<p>Modal content goes here.</p>
<button class="uk-modal-close-default" type="button" uk-close></button>
</div>
</div>
Getting Started
To start using UIkit, include the following CSS and JS files in your HTML:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/uikit@3.16.19/dist/css/uikit.min.css" />
<script src="https://cdn.jsdelivr.net/npm/uikit@3.16.19/dist/js/uikit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/uikit@3.16.19/dist/js/uikit-icons.min.js"></script>
Then, you can start using UIkit classes and components in your HTML markup. For example:
<div class="uk-container">
<h1 class="uk-heading-medium">Welcome to UIkit</h1>
<p class="uk-text-lead">Start building your website with UIkit components!</p>
<button class="uk-button uk-button-primary">Get Started</button>
</div>
Competitor Comparisons
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
Pros of Bootstrap
- Larger community and ecosystem, resulting in more resources, plugins, and third-party integrations
- More extensive documentation and tutorials, making it easier for beginners to learn and implement
- Greater browser compatibility, especially for older versions of Internet Explorer
Cons of Bootstrap
- Heavier file size, which can impact page load times and performance
- More opinionated design, potentially leading to websites that look similar or "generic"
- Steeper learning curve for customization, especially when modifying the default styles
Code Comparison
Bootstrap:
<div class="container">
<div class="row">
<div class="col-md-6">Column 1</div>
<div class="col-md-6">Column 2</div>
</div>
</div>
UIkit:
<div class="uk-container">
<div class="uk-grid">
<div class="uk-width-1-2@m">Column 1</div>
<div class="uk-width-1-2@m">Column 2</div>
</div>
</div>
Both frameworks use similar concepts for creating responsive layouts, but UIkit's class naming convention is more descriptive and follows a different pattern compared to Bootstrap's column-based approach.
A utility-first CSS framework for rapid UI development.
Pros of Tailwind CSS
- Highly customizable with a utility-first approach
- Smaller file sizes due to purging unused styles
- Faster development with pre-built utility classes
Cons of Tailwind CSS
- Steeper learning curve for developers new to utility-first CSS
- Can lead to longer class names and potentially cluttered HTML
- Requires additional configuration for optimal performance
Code Comparison
UIkit:
<div class="uk-card uk-card-default uk-card-body">
<h3 class="uk-card-title">Default</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
Tailwind CSS:
<div class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4">
<h3 class="text-xl font-bold mb-2">Default</h3>
<p class="text-gray-700 text-base">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
Both UIkit and Tailwind CSS are popular front-end frameworks, but they differ in their approach. UIkit provides pre-built components with a more traditional CSS framework structure, while Tailwind CSS focuses on utility classes for building custom designs. The choice between them depends on project requirements and developer preferences.
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
Pros of Foundation
- More extensive grid system with flexible options for responsive layouts
- Larger ecosystem with additional resources and plugins
- Better accessibility features out-of-the-box
Cons of Foundation
- Steeper learning curve due to more complex structure
- Larger file size, potentially impacting page load times
- Less frequent updates compared to UIkit
Code Comparison
Foundation:
.button {
@include button-style($background: $primary-color, $background-hover: scale-color($primary-color, $lightness: -15%));
}
UIkit:
.uk-button {
@extend .uk-button-default;
background-color: $global-primary-background;
}
Foundation uses mixins for button styles, allowing for more customization, while UIkit relies on extending pre-defined classes with simpler customization options. Foundation's approach offers more flexibility but requires more knowledge of the framework's internals.
Both frameworks provide comprehensive front-end solutions, but Foundation offers more advanced features at the cost of complexity, while UIkit focuses on simplicity and ease of use. The choice between them depends on project requirements and developer preferences.
Modern CSS framework based on Flexbox
Pros of Bulma
- Lightweight and modular, with a smaller file size than UIkit
- Flexbox-based, providing more flexible and responsive layouts
- Simple and intuitive class naming conventions
Cons of Bulma
- Less extensive component library compared to UIkit
- Lacks built-in JavaScript functionality for interactive components
- Limited customization options without modifying source Sass files
Code Comparison
Bulma (column layout):
<div class="columns">
<div class="column">First column</div>
<div class="column">Second column</div>
<div class="column">Third column</div>
</div>
UIkit (grid layout):
<div class="uk-grid">
<div class="uk-width-1-3">First column</div>
<div class="uk-width-1-3">Second column</div>
<div class="uk-width-1-3">Third column</div>
</div>
Both frameworks offer clean and readable syntax for creating layouts, but Bulma's approach is more straightforward and relies on simpler class names. UIkit provides more granular control over column widths through its class naming system.
Semantic is a UI component framework based around useful principles from natural language.
Pros of Semantic-UI
- More extensive component library with a wider range of UI elements
- Highly customizable theming system using LESS variables
- Intuitive and human-friendly class naming conventions
Cons of Semantic-UI
- Larger file size and potentially slower load times
- Less frequent updates and maintenance compared to UIkit
- Steeper learning curve for developers new to the framework
Code Comparison
Semantic-UI button example:
<button class="ui primary button">
Follow
</button>
UIkit button example:
<button class="uk-button uk-button-primary">
Follow
</button>
Both frameworks offer clean and readable class naming conventions, but Semantic-UI's approach is more intuitive and descriptive. UIkit uses a prefix-based naming system, while Semantic-UI opts for a more natural language structure.
Semantic-UI provides a more comprehensive set of UI components and a powerful theming system, making it suitable for complex projects with specific design requirements. However, this comes at the cost of a larger file size and potentially slower performance.
UIkit, on the other hand, offers a more lightweight solution with frequent updates and easier integration, making it ideal for smaller projects or those prioritizing performance. Its learning curve is generally less steep compared to Semantic-UI.
A minimalist CSS framework.
Pros of Milligram
- Extremely lightweight (2kb gzipped) for faster load times
- Minimalist design, offering a clean starting point for customization
- Simple and intuitive class naming conventions
Cons of Milligram
- Limited pre-built components compared to UIkit
- Less comprehensive documentation and examples
- Smaller community and ecosystem
Code Comparison
Milligram:
<div class="container">
<div class="row">
<div class="column">Column 1</div>
<div class="column">Column 2</div>
</div>
</div>
UIkit:
<div class="uk-container">
<div class="uk-grid">
<div class="uk-width-1-2">Column 1</div>
<div class="uk-width-1-2">Column 2</div>
</div>
</div>
Milligram uses a simpler class structure, while UIkit employs more specific prefixed classes. UIkit offers more granular control over layout and responsive behavior, but Milligram's approach is more straightforward for basic designs.
Both frameworks provide responsive grid systems, but UIkit includes a wider range of pre-built components and utilities. Milligram focuses on providing a minimal foundation, making it ideal for projects that require a lightweight starting point with custom styling. UIkit is better suited for rapid development of feature-rich interfaces with consistent design patterns.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
UIkit
UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.
- Homepage - Learn more about UIkit
- @getuikit - Get the latest buzz on Twitter
- Discord Chat - Join our developer chat on Discord.
UIkit is an Open Source project developed by YOOtheme.
Getting started
You have the following options to get UIkit:
- Download the latest release with pre-built CSS and JS.
- Install with npm to get all source files as they are available on GitHub:
npm install uikit
- Install with yarn to get all source files as they are available on GitHub:
yarn add uikit
- Install with pnpm to get all source files as they are available on GitHub:
pnpm add uikit
- Directly load UIkit from jsDelivr: https://www.jsdelivr.com/package/npm/uikit
- Clone the repo to get all source files including build scripts:
git clone git@github.com:uikit/uikit.git
Developers
To always have the latest development version of UIkit, even before a release, you may want to use npm or yarn with the dev
tag.
- Using npm:
npm install uikit@dev
- Using yarn:
yarn add uikit@dev
- Using pnpm:
pnpm add uikit@dev
- Using cdn: https://cdn.jsdelivr.net/npm/uikit@dev
Contributing
Finding bugs, sending pull requests or improving our docs - any contribution is welcome and highly appreciated. To get started, head over to our contribution guidelines. Thanks!
Versioning
UIkit is maintained by using the Semantic Versioning Specification (SemVer).
Browser Support
Latest â | Latest â | Latest â | Latest â | Latest â |
Copyright and License
Copyright YOOtheme GmbH under the MIT license.
Top Related Projects
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
A utility-first CSS framework for rapid UI development.
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
Modern CSS framework based on Flexbox
Semantic is a UI component framework based around useful principles from natural language.
A minimalist CSS framework.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot