Create a web UI
- User
Create a web UI
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Create a web UI
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Here's a modern web UI design concept with HTML, CSS, and JavaScript. This example creates a responsive dashboard interface with common UI components.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Web UI</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
/* CSS will go here */
:root {
--primary-color: #4361ee;
--secondary-color: #3f37c9;
--accent-color: #4895ef;
--light-color: #f8f9fa;
--dark-color: #212529;
--success-color: #4cc9f0;
--warning-color: #f8961e;
--danger-color: #f0506e;
--border-radius: 12px;
--box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f5f7fa;
color: var(--dark-color);
line-height: 1.6;
}
.container {
display: flex;
min-height: 100vh;
}
/* Sidebar */
.sidebar {
width: 250px;
background-color: white;
box-shadow: var(--box-shadow);
padding: 20px;
position: fixed;
height: 100vh;
transition: var(--transition);
}
.sidebar-header {
display: flex;
align-items: center;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #e9ecef;
}
.sidebar-header img {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 10px;
}
.sidebar-header h3 {
font-size: 18px;
font-weight: 600;
}
.sidebar-header p {
font-size: 12px;
color: #6c757d;
}
.sidebar-menu {
list-style: none;
}
.sidebar-menu li {
margin-bottom: 5px;
}
.sidebar-menu a {
display: flex;
align-items: center;
padding: 10px 15px;
color: var(--dark-color);
text-decoration: none;
border-radius: var(--border-radius);
transition: var(--transition);
}
.sidebar-menu a:hover, .sidebar-menu a.active {
background-color: var(--primary-color);
color: white;
}
.sidebar-menu i {
margin-right: 10px;
font-size: 16px;
}
/* Main Content */
.main-content {
margin-left: 250px;
padding: 20px;
width: calc(100% - 250px);
transition: var(--transition);
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
}
.search-bar {
display: flex;
align-items: center;
background-color: white;
padding: 10px 15px;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
width: 300px;
}
.search-bar input {
border: none;
outline: none;
width: 100%;
padding: 5px;
}
.user-profile {
display: flex;
align-items: center;
}
.user-profile img {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 10px;
}
.user-profile div p:first-child {
font-weight: 600;
font-size: 14px;
}
.user-profile div p:last-child {
font-size: 12px;
color: #6c757d;
}
/* Cards */
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.card {
background-color: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
transition: var(--transition);
}
.card:hover {
transform: translateY(-5px);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.card-header h3 {
font-size: 16px;
font-weight: 600;
}
.card-header i {
font-size: 20px;
color: #6c757d;
}
.card-body h2 {
font-size: 24px;
font-weight: 700;
margin-bottom: 5px;
}
.card-body p {
font-size: 14px;
color: #6c757d;
}
/* Charts */
.charts {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 20px;
margin-bottom: 30px;
}
.chart {
background-color: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
}
.chart-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.chart-header h3 {
font-size: 18px;
font-weight: 600;
}
/* Tables */
.recent-orders {
background-color: white;
border-radius: var(--border-radius);
padding: 20px;
box-shadow: var(--box-shadow);
}
.recent-orders table {
width: 100%;
border-collapse: collapse;
}
.recent-orders th, .recent-orders td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #e9ecef;
}
.recent-orders th {
font-weight: 600;
color: #6c757d;
font-size: 14px;
}
.status {
display: inline-block;
padding: 5px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.status.pending {
background-color: #fff3cd;
color: #856404;
}
.status.processing {
background-color: #cce5ff;
color: #004085;
}
.status.completed {
background-color: #d4edda;
color: #155724;
}
/* Responsive */
@media (max-width: 768px) {
.sidebar {
width: 70px;
}
.sidebar-header h3,
.sidebar-header p,
.sidebar-menu span {
display: none;
}
.sidebar-menu i {
margin-right: 0;
font-size: 20px;
}
.main-content {
margin-left: 70px;
width: calc(100% - 70px);
}
.search-bar {
width: 200px;
}
.charts {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Sidebar -->
<div class="sidebar">
<div class="sidebar-header">
<img src="https://via.placeholder.com/40" alt="Logo">
<div>
<h3>Admin Panel</h3>
<p>Dashboard</p>
</div>
</div>
<ul class="sidebar-menu">
<li><a href="#" class="active"><i class="fas fa-home"></i><span>Dashboard</span></a></li>
<li><a href="#"><i class="fas fa-chart-line"></i><span>Analytics</span></a></li>
<li><a href="#"><i class="fas fa-shopping-cart"></i><span>Orders</span></a></li>
<li><a href="#"><i class="fas fa-users"></i><span>Customers</span></a></li>
<li><a href="#"><i class="fas fa-box"></i><span>Products</span></a></li>
<li><a href="#"><i class="fas fa-cog"></i><span>Settings</span></a></li>
<li><a href="#"><i class="fas fa-envelope"></i><span>Messages</span></a></li>
<li><a href="#"><i class="fas fa-sign-out-alt"></i><span>Logout</span></a></li>
</ul>
</div>
<!-- Main Content -->
<div class="main-content">
<div class="header">
<div class="search-bar">
<i class="fas fa-search"></i>
<input type="text" placeholder="Search...">
</div>
<div class="user-profile">
<img src="https://via.placeholder.com/40" alt="User">
<div>
<p>John Doe</p>
<p>Admin</p>
</div>
</div>
</div>
<!-- Cards -->
<div class="cards">
<div class="card">
<div class="card-header">
<h3>Total Revenue</h3>
<i class="fas fa-dollar-sign"></i>
</div>
<div class="card-body">
<h2>$42,857</h2>
<p>+12% from last month</p>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>Total Orders</h3>
<i class="fas fa-shopping-bag"></i>
</div>
<div class="card-body">
<h2>1,256</h2>
<p>+8% from last month</p>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>Total Customers</h3>
<i class="fas fa-users"></i>
</div>
<div class="card-body">
<h2>8,563</h2>
<p>+15% from last month</p>
</div>
</div>
<div class="card">
<div class="card-header">
<h3>Conversion Rate</h3>
<i class="fas fa-chart-line"></i>
</div>
<div class="card-body">
<h2>3.25%</h2>
<p>+0.5% from last month</p>
</div>
</div>
</div>
<!-- Charts -->
<div class="charts">
<div class="chart">
<div class="chart-header">
<h3>Sales Overview</h3>
<select>
<option>Last 7 Days</option>
<option>Last Month</option>
<option>Last Year</option>
</select>
</div>
<div class="chart-body">
<!-- Chart would be rendered here with a library like Chart.js -->
<div style="height: 300px; background-color: #f8f9fa; border-radius: 8px; display: flex; align-items: center; justify-content: center;">
<p>Sales chart would appear here</p>
</div>
</div>
</div>
<div class="chart">
<div class="chart-header">
<h3>Customer Distribution</h3>
</div>
<div class="chart-body">
<!-- Chart would be rendered here -->
<div style="height: 300px; background-color: #f8f9fa; border-radius: 8px; display: flex; align-items: center; justify-content: center;">
<p>Customer distribution chart</p>
</div>
</div>
</div>
</div>
<!-- Recent Orders -->
<div class="recent-orders">
<div class="chart-header">
<h3>Recent Orders</h3>
<a href="#">View All</a>
</div>
<table>
<thead>
<tr>
<th>Order ID</th>
<th>Customer</th>
<th>Date</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>#12345</td>
<td>John Smith</td>
<td>2023-05-15</td>
<td>$125.00</td>
<td><span class="status completed">Completed</span></td>
</tr>
<tr>
<td>#12344</td>
<td>Sarah Johnson</td>
<td>2023-05-14</td>
<td>$89.50</td>
<td><span class="status processing">Processing</span></td>
</tr>
<tr>
<td>#12343</td>
<td>Michael Brown</td>
<td>2023-05-13</td>
<td>$215.75</td>
<td><span class="status pending">Pending</span></td>
</tr>
<tr>
<td>#12342</td>
<td>Emily Davis</td>
<td>2023-05-12</td>
<td>$65.25</td>
<td><span class="status completed">Completed</span></td>
</tr>
<tr>
<td>#12341</td>
<td>Robert Wilson</td>
<td>2023-05-11</td>
<td>$145.00</td>
<td><span class="status processing">Processing</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script>
// JavaScript for interactive elements
document.addEventListener('DOMContentLoaded', function() {
// Toggle sidebar on mobile
const sidebar = document.querySelector('.sidebar');
const mainContent = document.querySelector('.main-content');
// This would be triggered by a button in a real implementation
function toggleSidebar() {
sidebar.classList.toggle('collapsed');
mainContent.classList.toggle('expanded');
}
// Example of dynamic data loading
function loadChartData() {
console.log('Loading chart data...');
// In a real app, this would fetch data from an API
}
// Initialize charts (would use a library like Chart.js in a real app)
loadChartData();
});
</script>
</body>
</html>
Responsive Layout:
Modern Components:
Visual Design:
Interactive Elements:
To implement this UI, you would:
Would you like me to explain any specific part of this UI in more detail or suggest modifications for a particular use case?