react-country-state-city
Version:
A lightweight and easy-to-use React library that provides a comprehensive list of regions or continents, countries, states, cities languages, and country phone codes for creating dynamic and searchable dropdowns. Ideal for building forms and input fields
103 lines (87 loc) • 1.87 kB
CSS
@font-face {
font-family: "Twemoji Mozilla";
src: url(./fonts/TwemojiMozilla.ttf) format("truetype");
font-weight: normal;
font-style: normal;
}
.stdropdown-container {
text-align: left;
border: 1px solid #ccc;
position: relative;
border-radius: 5px;
font-family: Arial, Helvetica, sans-serif;
}
.stdropdown-input input {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Twemoji Mozilla" ;
}
.stdropdown-flag {
font-family: "Twemoji Mozilla" ;
}
.stdropdown-menu::-webkit-scrollbar {
width: 2px;
}
.stdropdown-menu::-webkit-scrollbar-track {
background: #f1f1f1;
}
.stdropdown-menu::-webkit-scrollbar-thumb {
background: #888;
}
.stdropdown-menu::-webkit-scrollbar-thumb:hover {
background: #555;
}
.stdropdown-input {
padding: 5px;
display: flex;
align-items: center;
justify-content: space-between;
user-select: none;
}
.stdropdown-menu {
position: absolute;
transform: translateY(4px);
width: 100%;
border: 1px solid #ccc;
border-radius: 5px;
overflow: auto;
max-height: 150px;
background-color: #fff;
z-index: 99;
}
.stdropdown-item {
padding: 5px;
cursor: pointer;
}
.stdropdown-item:hover {
background-color: rgba(159, 195, 248, 0.4392156863);
}
.stdropdown-item.selected {
background-color: #0d6efd;
color: #fff;
}
.stdropdown-tags {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.stdropdown-tag-item {
background-color: #ddd;
padding: 2px 4px;
border-radius: 2px;
display: flex;
align-items: center;
}
.stdropdown-tag-close {
display: flex;
align-items: center;
}
.stsearch-box {
padding: 5px;
background-color: transparent;
}
.stsearch-box input {
width: 100%;
box-sizing: border-box;
padding: 5px;
border: 1px solid #ccc;
border-radius: 5px;
}