search results:

    • Standard
    • React
    Pricing Learn Community
    • + D
    • Light
    • Dark
    • System
    logo TW Elements
    • Getting started
      • Quick start
      • Tutorials
      • Design system
      • Local installation
      • Optimization
      • Dark mode
      • Theming
      • Changelog
      • Migrating to v2
      • Internationalization guide
      • Class customization
      • Icons Integration
    • CommercialNew
      • Pricing
      • License
      • Installation
      • Git & repository
      • Premium Support
    • Integrations
      • Angular
      • ASP.NET
      • Django
      • Express
      • Laravel
      • Next
      • Nuxt
      • Qwik
      • 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
      • Admin Charts
      • Admin Complex
      • Admin Forms
      • Admin Maps
      • Admin Navigation
      • Admin tables
      • Banners
      • Contact
      • Content
      • CTA
      • FAQ
      • Features
      • Headers
      • Hero / Intro sections
      • Logo clouds
      • Mega menu
      • News
      • Newsletter
      • Pricing
      • Projects
      • Stats
      • Stats admin
      • 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 dark:bg-surface-dark dark:text-white">
              <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 dark:bg-surface-dark">
              <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 dark:bg-surface-dark">
              <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 dark:bg-surface-dark">
              <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 dark:bg-surface-dark">
              <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 dark:bg-surface-dark">
              <code class="self-center">.shadow-5</code>
            </div>
          </div>
          
            
        

    Hey there 👋 we're excited about TW elements and want to see it grow! If you enjoy it, help the project grow by sharing it with your peers. Every share counts, thank you!

    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="flex flex-1 flex-wrap items-end justify-between space-y-2 px-3 py-8 dark:bg-surface-dark">
            <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 dark:bg-surface-dark"></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

    Generators and builders:

    Form drag & drop Typography SVG icon Instagram Filters button card table flexbox logo grid footer

    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
    © 2024 Copyright: MDBootstrap.com

    Access restricted

    To view this section you must have an active PRO account

    Log in to your account or purchase an TWE subscription if you don't have one.

    Buy TWE PRO