Ayudan a iniciar acciones que los usuarios necesitan.
El grupo de Botones proporciona a los usuarios organización del contenido y sus
acciones; la accesibilidad a la información; y la usabilidad de la interfaz de una
aplicación o sitio web para interactuar con las opciones y acciones disponibles.
Estos son los aspectos que influyen en cuándo y donde utilizarlos:
<div class="botones-segmentados">
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
</div>
.botones-segmentados {
align-items: flex-start;
display: flex;
padding: 0px;
}
.botones-segmentados button:first-child {
border-radius: 10px 0px 0px 10px;
}
.botones-segmentados button:last-child {
border-radius: 0px 10px 10px 0px;
}
.botones-segmentados button {
align-items: center;
background-color: white;
border-radius: 0;
border: 1px solid #024588;
color: #024588;
cursor: pointer;
display: flex;
font-family: 'Montserrat';
font-size: 16px;
font-style: normal;
font-weight: 600;
gap: 10px;
height: 40px;
justify-content: center;
line-height: 26px;
mix-blend-mode: normal;
padding: 7px 28px;
text-align: center;
transition-duration: 0.2s;
transition-timing-function: ease-in-out;
}
.botones-segmentados button:hover {
background: #EBF2F9;
border: 2px solid #024588;
}
.botones-segmentados button.grupo-btn-active {
background: #D7E5F4;
border: 3px solid #024588;
}
const elementos = document.querySelectorAll(".grupo-btn");
elementos.forEach((elemento) => {
elemento.addEventListener("click", function () {
elementos.forEach((boton) => {
if (boton != elemento)
boton.classList.remove("grupo-btn-active");
});
elemento.classList.toggle("grupo-btn-active");
});
});
<div class="botones-segmentados">
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
</div>
.botones-segmentados {
align-items: flex-start;
display: flex;
padding: 0px;
}
.botones-segmentados button:first-child {
border-radius: 10px 0px 0px 10px;
}
.botones-segmentados button:last-child {
border-radius: 0px 10px 10px 0px;
}
.botones-segmentados button {
align-items: center;
background-color: white;
border-radius: 0;
border: 1px solid #024588;
color: #024588;
cursor: pointer;
display: flex;
font-family: 'Montserrat';
font-size: 16px;
font-style: normal;
font-weight: 600;
gap: 10px;
height: 40px;
justify-content: center;
line-height: 26px;
mix-blend-mode: normal;
padding: 7px 28px;
text-align: center;
transition-duration: 0.2s;
transition-timing-function: ease-in-out;
}
.botones-segmentados button:hover {
background: #EBF2F9;
border: 2px solid #024588;
}
.botones-segmentados button.grupo-btn-active {
background: #D7E5F4;
border: 3px solid #024588;
}
const elementos = document.querySelectorAll(".grupo-btn");
elementos.forEach((elemento) => {
elemento.addEventListener("click", function () {
elementos.forEach((boton) => {
if (boton != elemento)
boton.classList.remove("grupo-btn-active");
});
elemento.classList.toggle("grupo-btn-active");
});
});
<div class="botones-segmentados">
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
<button type="button" class="grupo-btn">Etiqueta</button>
</div>
.botones-segmentados {
align-items: flex-start;
display: flex;
padding: 0px;
}
.botones-segmentados button:first-child {
border-radius: 10px 0px 0px 10px;
}
.botones-segmentados button:last-child {
border-radius: 0px 10px 10px 0px;
}
.botones-segmentados button {
align-items: center;
background-color: white;
border-radius: 0;
border: 1px solid #024588;
color: #024588;
cursor: pointer;
display: flex;
font-family: 'Montserrat';
font-size: 16px;
font-style: normal;
font-weight: 600;
gap: 10px;
height: 40px;
justify-content: center;
line-height: 26px;
mix-blend-mode: normal;
padding: 7px 28px;
text-align: center;
transition-duration: 0.2s;
transition-timing-function: ease-in-out;
}
.botones-segmentados button:hover {
background: #EBF2F9;
border: 2px solid #024588;
}
.botones-segmentados button.grupo-btn-active {
background: #D7E5F4;
border: 3px solid #024588;
}
const elementos = document.querySelectorAll(".grupo-btn");
elementos.forEach((elemento) => {
elemento.addEventListener("click", function () {
elementos.forEach((boton) => {
if (boton != elemento)
boton.classList.remove("grupo-btn-active");
});
elemento.classList.toggle("grupo-btn-active");
});
});
<div class="botones-segmentados">
<button type="button" class="grupo-btn">
<img src="iconos/personas_lineal.svg" alt="" width="32" height="32">
</button>
<button type="button" class="grupo-btn">
<img src="iconos/personas_lineal.svg" alt="" width="32" height="32">
</button>
<button type="button" class="grupo-btn">
<img src="iconos/personas_lineal.svg" alt="" width="32" height="32">
</button>
</div>
.botones-segmentados {
align-items: flex-start;
display: flex;
padding: 0px;
}
.botones-segmentados button:first-child {
border-radius: 10px 0px 0px 10px;
}
.botones-segmentados button:last-child {
border-radius: 0px 10px 10px 0px;
}
.botones-segmentados button {
align-items: center;
background-color: white;
border-radius: 0;
border: 1px solid #024588;
color: #024588;
cursor: pointer;
display: flex;
font-family: 'Montserrat';
font-size: 16px;
font-style: normal;
font-weight: 600;
gap: 10px;
height: 40px;
justify-content: center;
line-height: 26px;
mix-blend-mode: normal;
padding: 7px 28px;
text-align: center;
transition-duration: 0.2s;
transition-timing-function: ease-in-out;
}
.botones-segmentados button:hover {
background: #EBF2F9;
border: 2px solid #024588;
}
.botones-segmentados button.grupo-btn-active {
background: #D7E5F4;
border: 3px solid #024588;
}
const elementos = document.querySelectorAll(".grupo-btn");
elementos.forEach((elemento) => {
elemento.addEventListener("click", function () {
elementos.forEach((boton) => {
if (boton != elemento)
boton.classList.remove("grupo-btn-active");
});
elemento.classList.toggle("grupo-btn-active");
});
});
<div class="botones-segmentados">
<button type="button" class="grupo-btn">
<img src="iconos/personas_lineal.svg" alt="" width="32" height="32">
Etiqueta</button>
<button type="button" class="grupo-btn">
<img src="iconos/personas_lineal.svg" alt="" width="32" height="32">
Etiqueta</button>
<button type="button" class="grupo-btn">
<img src="iconos/personas_lineal.svg" alt="" width="32" height="32">
Etiqueta</button>
</div>
.botones-segmentados {
align-items: flex-start;
display: flex;
padding: 0px;
}
.botones-segmentados button:first-child {
border-radius: 10px 0px 0px 10px;
}
.botones-segmentados button:last-child {
border-radius: 0px 10px 10px 0px;
}
.botones-segmentados button {
align-items: center;
background-color: white;
border-radius: 0;
border: 1px solid #024588;
color: #024588;
cursor: pointer;
display: flex;
font-family: 'Montserrat';
font-size: 16px;
font-style: normal;
font-weight: 600;
gap: 10px;
height: 40px;
justify-content: center;
line-height: 26px;
mix-blend-mode: normal;
padding: 7px 28px;
text-align: center;
transition-duration: 0.2s;
transition-timing-function: ease-in-out;
}
.botones-segmentados button:hover {
background: #EBF2F9;
border: 2px solid #024588;
}
.botones-segmentados button.grupo-btn-active {
background: #D7E5F4;
border: 3px solid #024588;
}
const elementos = document.querySelectorAll(".grupo-btn");
elementos.forEach((elemento) => {
elemento.addEventListener("click", function () {
elementos.forEach((boton) => {
if (boton != elemento)
boton.classList.remove("grupo-btn-active");
});
elemento.classList.toggle("grupo-btn-active");
});
});