search results:

    • Standard
    • React
    Learn Community
    • + D
    • Light
    • Dark
    • System
    License Pricing
    logo TW Elements
    • Getting started
      • Quick start
      • Tutorials
      • Design system
      • Local installation
      • Optimization
      • Dark mode
      • Theming
      • Changelog
      • Contribute
      • Internationalization guide
    • CommercialNew
      • Pricing
      • License
      • Premium Support
    • Integrations
      • Angular
      • Django
      • Express
      • Laravel
      • Next
      • Nuxt
      • React
      • Remix
      • Solid
      • Svelte
      • SvelteKit
      • Vue
    • Content & styles
      • Animations
      • Animations Extended
      • Colors
      • Dividers
      • Figures
      • Headings
      • Hover effects
      • Icons
      • Images
      • Mask
      • Shadows
      • Typography
    • Navigation
      • Breadcrumbs
      • Footer
      • Headers
      • Mega menu
      • Navbar
      • Offcanvas
      • Pagination
      • Pills
      • Scrollspy
      • Sidenav
      • Tabs
    • Components
      • Accordion
      • Alerts
      • Avatar
      • Badges
      • Button group
      • Buttons
      • Cards
      • Carousel
      • Chips
      • Collapse
      • Dropdown
      • Gallery
      • Jumbotron
      • Lightbox
      • Link
      • List group
      • Modal
      • Notifications
      • Paragraphs
      • Placeholders
      • Popconfirm
      • Popover
      • Progress
      • Rating
      • Scroll back to top button
      • Social buttons
      • Spinners
      • Stepper
      • Testimonials
      • Timeline
      • Toast
      • Tooltip
      • Video
      • Video carousel
    • Forms
      • Autocomplete
      • Checkbox
      • Datepicker
      • Datetimepicker
      • File input
      • Form templates
      • Input Group
      • Inputs
      • Login form
      • Multi range slider
      • Radio
      • Range
      • Registration form
      • Search
      • Select
      • Switch
      • Textarea
      • Timepicker
      • Validation
    • Data
      • Charts
      • Charts advanced
      • Datatables
      • Tables
    • Methods
      • Clipboard
      • Infinite scroll
      • Lazy loading
      • Loading management
      • Ripple
      • Scrollbar
      • Smooth scroll
      • Sticky
      • Touch
    • Design Blocks
      • Banners
      • Contact
      • Content
      • CTA
      • FAQ
      • Features
      • Headers
      • Hero / Intro sections
      • Logo clouds
      • Mega menu
      • News
      • Newsletter
      • Pricing
      • Projects
      • Stats
      • Team
      • Testimonials
    • Tools
      • Button generator
      • Card generator
      • Flexbox generator
      • Footer generator
      • Form builder
      • Grid generator
      • Icon generator
      • Instagram Filters generator
      • Logo generator
      • Table generator
      • Typography generator
    • Coming Soon
      • Angular
      • Builder
      • Templates
      • Vue
    • Resources
      • Playground
      • YouTube Channel
      • Private FB Group
      • Newsletter
      • UI Design course New
      • UI / UX tips

    Shadows

    Tailwind CSS Shadows

    Responsive shadows built with Tailwind CSS. Download for free without registration.


    Basic example

    For light design and bright compositions use standard shadows. To apply a shadow to an element simply add one of the following classes to it.

    .shadow-none removes shadows
    .shadow-1
    .shadow-2
    .shadow-3
    .shadow-4
    .shadow-5
    • HTML
            
                
          <div
            class="flex flex-1 flex-wrap justify-between gap-2 dark:text-neutral-800">
            <div
              class="flex h-[100px] w-[100px] flex-col justify-center rounded-lg bg-white text-center shadow-none">
              <code class="self-center">.shadow-none</code>
              <small>removes shadows</small>
            </div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-white text-center shadow-1">
              <code class="self-center">.shadow-1</code>
            </div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-white text-center shadow-2">
              <code class="self-center">.shadow-2</code>
            </div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-white text-center shadow-3">
              <code class="self-center">.shadow-3</code>
            </div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-white text-center shadow-4">
              <code class="self-center">.shadow-4</code>
            </div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-white text-center shadow-5">
              <code class="self-center">.shadow-5</code>
            </div>
          </div>
          
            
        

    Hey there 👋 we want to make TW elements a community-driven project. It's open source and free, and we would like it to stay that way. If you enjoy it, help the project grow by sharing it with your peers. Every share counts, thank you!

    Share via Dev.to Share via Twitter Share via Facebook Share via Pinterest Share via Reddit Share via StumbleUpon Share via Vkontakte Share via Weibo Share via HackerNews Share via Gmail Share via Email

    Strong shadows

    For dark design and dark elements use strong shadows by adding -strong to the shadow class. For example: .shadow-2-strong

    • HTML
            
                
          <div
            class="mb-12 flex flex-1 flex-wrap items-end justify-between space-y-2 px-3 py-10">
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-neutral-300 text-center shadow-none"></div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-neutral-300 text-center shadow-1-strong"></div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-neutral-300 text-center shadow-2-strong"></div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-neutral-300 text-center shadow-3-strong"></div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-neutral-300 text-center shadow-4-strong"></div>
            <div
              class="flex h-[100px] w-[100px] justify-center rounded-lg bg-neutral-300 text-center shadow-5-strong"></div>
          </div>
          
            
        

    Inner shadow

    Use the .shadow-twe-inner utility to apply a subtle inset box shadow to an element. This can be useful for things like form controls or wells.

    • HTML
            
                
          <div
            class="flex h-[100px] w-[100px] justify-center rounded-lg bg-white text-center shadow-twe-inner"></div>
          
            
        

    Shadow on hover

    Use .transition-shadow class to the element to apply a shadow hover effect.

    • HTML
            
                
          <img
            src="https://tecdn.b-cdn.net/img/new/standard/city/041.webp"
            class="h-auto max-w-sm rounded-lg shadow-none transition-shadow duration-300 ease-in-out hover:shadow-4-strong"
            alt="" />
          
            
        

    Images with shadow

    Theoretically, depending on the brightness of the image you should use standard or strong shadow. However, practical use shows that in most graphics strong shadows work better in most cases with images.

    Hollywood Sign on The Hill
    Five Lands National Park
    Los Angeles Skyscrapers
    Hollywood Sign on The Hill
    Five Lands National Park
    Los Angeles Skyscrapers
    • HTML
            
                
          <div class="grid grid-cols-3 items-center gap-4">
            <div class="mb-4">
              <img
                src="https://tecdn.b-cdn.net/img/new/standard/city/041.webp"
                class="h-auto w-full rounded-lg shadow-4-strong"
                alt="Hollywood Sign on The Hill" />
            </div>
            <div class="mb-4">
              <img
                src="https://tecdn.b-cdn.net/img/new/standard/city/031.webp"
                class="h-auto w-full rounded-lg shadow-4-strong"
                alt="Five Lands National Park" />
            </div>
            <div class="mb-4">
              <img
                src="https://tecdn.b-cdn.net/img/new/standard/city/043.webp"
                class="h-auto w-full rounded-lg shadow-4-strong"
                alt="Los Angeles Skyscrapers" />
            </div>
          </div>
          
            
        

    Related resources

    Tutorials:

    hover state masks buttons rounded corners shadows cards pricing cards sizing forms

    Extended Docs:

    hover effects images mask mega menu button group buttons cards carousel dropdown gallery jumbotron modal placeholders popover testimonials toast form templates login form registration form ripple border opacity borders parallax text shadow z index

    Design System (Figma):

    introduction content should be the star user experience do not start with the roof project personality design system plan the process principles tips and tricks
    • Basic example
    • Strong shadows
    • Inner shadow
    • Shadow on hover
    • Images with shadow
    • Related resources
    Get useful tips & free resources directly to your inbox along with exclusive subscriber-only content.
    Join our mailing list now
    © 2023 Copyright: MDBootstrap.com