Bootstrap snippet and html example. stories like WhatsApp

Bootstrap 5.0.1 snippet "stories like WhatsApp" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: stories

HTML code

Clean, semantic HTML that powers this Bootstrap 5.0.1 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<div class="container">
    <div class="row">
        <div class="col-lg-4 layout-spacing">
            <div class="statbox widget box box-shadow">
                <div class="widget-header">
                    <div class="row">
                        <div class="col-xl-12 col-md-12 col-sm-12 col-12">
                            <h4 class="pb-0">Stories</h4>
                        </div>
                    </div>
                </div>
                <div class="widget-content widget-content-area">
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12">
                            <div id="content_2" class="tabcontent"> 
                                <div class="story-container-2">
                                    <div class="single-story">
                                        <div class="story-dp">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar7.png">
                                            <img src="assets/img/plus.png" class="add-story">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">John Doe</p>
                                            <p class="time">Tap to add a story</p>
                                        </div>
                                    </div>
                                    <p class="divider">Recently Added</p>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar6.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Katharina Nielsen</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar1.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Katharina Nielsen</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar2.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Katharina Nielsen</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar3.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Katharina Nielsen</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar7.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Flownadn Browerty</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar6.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Vretihg Folsenthww</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp unseen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar7.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Katharina Nielsen</p>
                                            <p class="time">Today, 12:33</p>
                                        </div>
                                    </div>
                                    <p class="divider">Viewed Stories</p>
                                    <div class="single-story">
                                        <div class="story-dp seen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar8.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">jonh Doe</p>
                                            <p class="time">Today, 02:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp seen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar3.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Cartmanson Lawson</p>
                                            <p class="time">Today, 02:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp seen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar4.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Martirty mclow</p>
                                            <p class="time">Today, 02:33</p>
                                        </div>
                                    </div>
                                    <div class="single-story">
                                        <div class="story-dp seen">
                                            <img src="https://bootdey.com/img/Content/avatar/avatar2.png">
                                        </div>
                                        <div class="story-author">
                                            <p class="name">Martha Lawson</p>
                                            <p class="time">Today, 02:33</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="widget-footer p-2 text-center bg-light-primary">
                    <a class="text-primary strong" href="#">View All</a>
                </div>
            </div>
        </div>
    </div>
</div>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 5.0.1 to keep the design, spacing, and responsiveness consistent.

body{
    background:#eee;
    margin-top:20px;
}
.widget {
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 6px;
    -webkit-box-shadow: 0 4px 6px 0 rgb(85 85 85 / 8%), 0 1px 20px 0 rgb(0 0 0 / 7%), 0px 1px 11px 0px rgb(0 0 0 / 7%);
    -moz-box-shadow: 0 4px 6px 0 rgba(85, 85, 85, 0.08), 0 1px 20px 0 rgba(0, 0, 0, 0.07), 0px 1px 11px 0px rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 6px 0 rgb(85 85 85 / 8%), 0 1px 20px 0 rgb(0 0 0 / 7%), 0px 1px 11px 0px rgb(0 0 0 / 7%);
}
.widget.box .widget-header {
    background: #fff;
    padding: 0px 8px 0px;
    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
}
.widget .widget-header {
    border-bottom: 0px solid #f1f2f3;
}
.widget.box .widget-header {
    background: #fff;
    padding: 0px 8px 0px;
    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
}
.widget .widget-header {
    border-bottom: 0px solid #f1f2f3;
}
.widget .widget-header:after {
    clear: both;
}
.widget .widget-header:before, .widget .widget-header:after {
    display: table;
    content: "";
    line-height: 0;
}
.widget-content-area {
    padding: 20px;
    position: relative;
    background-color: #fff;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.statbox .widget-content:before, .statbox .widget-content:after {
    display: table;
    content: "";
    line-height: 0;
    clear: both;
}
.statbox .widget-content:before, .statbox .widget-content:after {
    display: table;
    content: "";
    line-height: 0;
    clear: both;
}



.story-container-2 .single-story {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.story-container-2 .story-dp {
    height: 50px;
    width: 50px;
    position: relative;
    border-radius: 50%;
    margin-right: 15px;
    padding: 3px;
}

.story-container-2 .story-dp img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.story-container-2 .story-author p.name {
    margin-bottom: 0px;
    font-weight: 600;
    font-size: 13px;
}
.story-container-2 .story-author p.time {
    margin-bottom: 0px;
    font-weight: 500;
    font-size: 12px;
}
.story-container-2 .story-dp img.add-story {
    position: absolute;
    height: 19px !important;
    width: 19px !important;
    right: -3px;
}
.story-container-2 .story-dp img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.story-container-2 p.divider {
    margin: 10px 0px 10px 0px;
    font-weight: 600;
    font-size: 12px;
    color: #404040;
}
.widget.box .widget-footer {
    padding: 2rem 2.25rem;
    background-color: #ffffff;
    border-top: 1px solid #EBEDF3;
}
.bg-light-primary {
    background-color: #f6f1ff!important;
    border-color: #f6f1ff;
    color: #5526ab;
}


Similar snippets

Bootstrap example and template. stories

stories

Bootstrap example and template. timeline events area

timeline events area

Bootstrap example and template. shopping cart

shopping cart

Bootstrap example and template. blog comments

blog comments

Bootstrap example and template. My team

My team

FAQ

How do I use this snippet?

Include Bootstrap 5.0.1, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 5.0.1.

Bootstrap example and template. stories like WhatsApp

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 8.9K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 5.0.1

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 5.0.1 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working