React Bootstrap Borders

React Borders - Bootstrap 4 & Material Design

Note: We are transitioning MDB4 to a legacy version and focusing on developing MDB5. While we'll continue to support for the transition period, we encourage you to migrate to MDB5. We're offering a 50% discount on MDB5 PRO to help with your transition, enabling you to leverage the full potential of the latest version. You can find more information here.
get 50% discount on MDB5 PRO

React Bootstrap borders are lines placed on the edges of buttons, images, and other web elements. Additionally, border-radius class rounds the elements corners.

Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.


Border

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

Additive

        
            
                import React from "react";

                const BorderPage = () => {
                    return (
                        <>
                            <span className="block-example border border-dark"></span>
                            <span className="block-example border-top border-dark"></span>
                            <span className="block-example border-right border-dark"></span>
                            <span className="block-example border-bottom border-dark"></span>
                            <span className="block-example border-left border-dark"></span>
                        </>
                    );
                }

                export default BorderPage;
                
        
    

Subtractive

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

        
            
                    import React from "react";

                    const BorderPage = () => {
                        return (
                            <>
                                <span className="block-example border border-0 border-dark"></span>
                                <span className="block-example border border-top-0 border-dark"></span>
                                <span className="block-example border border-right-0 border-dark"></span>
                                <span className="block-example border border-bottom-0 border-dark"></span>
                                <span className="block-example border border-left-0 border-dark"></span>
                            </>
                        );
                    }

                    export default BorderPage;
                
        
    

Border color

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

        
            
                    import React from "react";

                    const BorderPage = () => {
                        return (
                            <>
                                <span className="block-example border border-primary"></span>
                                <span className="block-example border border-secondary"></span>
                                <span className="block-example border border-success"></span>
                                <span className="block-example border border-danger"></span>
                                <span className="block-example border border-warning"></span>
                                <span className="block-example border border-info"></span>
                                <span className="block-example border border-light"></span>
                                <span className="block-example border border-dark"></span>
                                <span className="block-example border border-white"></span>
                            </>
                        );
                    }

                    export default BorderPage;
                
        
    

Border-radius

Add classes to an element to easily round its corners.

        
            
                    import React from "react";

                    const BorderPage = () => {
                        return (
                            <>
                                <img className="rounded mb-0" alt="100x100" src="https://place-hold.it/100x100" />
                                <img className="rounded-top" alt="100x100" src="https://place-hold.it/100x100" />
                                <img className="rounded-right" alt="100x100" src="https://place-hold.it/100x100" />
                                <img className="rounded-bottom" alt="100x100" src="https://place-hold.it/100x100" />
                                <img className="rounded-left" alt="100x100" src="https://place-hold.it/100x100" />
                                <img className="rounded-circle" alt="100x100" src="https://place-hold.it/100x100" />
                                <img className="rounded-pill" alt="150x75" src="https://place-hold.it/150x75" />
                                <img className="rounded-0" alt="100x100" src="https://place-hold.it/100x100" />
                            </>
                        );
                    }

                    export default BorderPage;