Make smaller button in bootstrap
Bootstrap provides four button sizes:
The classes that define the different sizes are:
.btn-lg
.btn-md
.btn-sm
.btn-xs // Removed in Bootstrap 4+
The following example shows the code for different button sizes:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body>
<div class="container">
<h2>Button Sizes</h2>
<button type="button" class="btn btn-primary btn-lg">Large</button>
<button type="button" class="btn btn-primary btn-md">Medium</button>
<button type="button" class="btn btn-primary btn-sm">Small</button>
</div>
Manually setting the padding in y-direction to 0 and adding an inline-style to reduce the font size gave me an xs-Button in Bootstrap 4:
<input type="submit" value="Submit" class="btn btn-sm btn-outline-primary py-0" style="font-size: 0.8em;">