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
    • Overview
    • CARDS

    Borders

    Tailwind CSS Borders

    Use responsive borders utilities with TW elements. A tutorial how to style the border and border-radius of an element.


    Basic examples

    Use border utilities to add or remove an element’s borders. Choose from all borders or one at a time.

    Additive

    Additive classes are used to add borders.

    • HTML
            
                
              <span class="border"></span>
              <span class="border-t"></span>
              <span class="border-r"></span>
              <span class="border-b"></span>
              <span class="border-l"></span>
              
            
        

    Subtractive

    Subtractive classes are used to remove borders.

    • HTML
            
                
              <span class="border-0"></span>
              <span class="border border-t-0"></span>
              <span class="border border-r-0"></span>
              <span class="border border-b-0"></span>
              <span class="border border-l-0"></span>
              
            
        

    Color

    Change the border color using utilities built on our theme colors.

    • HTML
            
                
            <span class="border border-primary"></span>
            <span class="border border-secondary"></span>
            <span class="border border-success"></span>
            <span class="border border-danger"></span>
            <span class="border border-warning"></span>
            <span class="border border-info"></span>
            
            
        

    Border width

    Use the .border-0, .border, .border-2, .border-4, or .border-8 classes to set the border width.

    • HTML
            
                
            <span class="border-0"></span>
            <span class="border"></span>
            <span class="border-2"></span>
            <span class="border-4"></span>
            <span class="border-8"></span>
            
            
        

    Border radius

    Add classes to an element to easily round its corners.

    • HTML
            
                
            <span class="rounded"></span>
            <span class="rounded-t"></span>
            <span class="rounded-r"></span>
            <span class="rounded-b"></span>
            <span class="rounded-l"></span>
            <span class="rounded-tl"></span>
            <span class="rounded-tr"></span>
            <span class="rounded-br"></span>
            <span class="rounded-bl"></span>
            <span class="rounded-0"></span>
            
            
        

    Sizes

    Use classes like .rounded, .rounded-lg, or rounded-2xl to apply different border radius sizes to an element.

    • HTML
            
                
              <span class="rounded-none"></span>
              <span class="rounded-sm"></span>
              <span class="rounded"></span>
              <span class="rounded-md"></span>
              <span class="rounded-lg"></span>
              <span class="rounded-xl"></span>
              <span class="rounded-2xl"></span>
              <span class="rounded-3xl"></span>
              <span class="rounded-full"></span>
              
            
        

    Related resources

    Opacity Visibility Visibility hidden Colors Border opacity Box sizing Spacing

    If you are looking for more advanced options, try borders from MDBootstrap.

    • Basic examples
      • Additive
      • Subtractive
    • Color
    • Border-width
    • Border-radius
      • Sizes
    • 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