Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove focus ring #40

Open
chriscoindeskindices opened this issue Dec 13, 2022 · 3 comments
Open

remove focus ring #40

chriscoindeskindices opened this issue Dec 13, 2022 · 3 comments

Comments

@chriscoindeskindices
Copy link

How do I remove the focus ring? I tried to add styles to rti--container:focus { outline: none } and rti--input:focus { outline: none }, but it's not working

@JunaidKhan444
Copy link

@chriscoindeskindices Have you found the solution?

@akshaymemail
Copy link

akshaymemail commented Nov 8, 2023

I figured out the solution :

JSX :
`import React, { useEffect } from "react";
import { TagsInput } from "react-tag-input-component";
import "./styles.css";

const TagInput = (props) => {
useEffect(() => {
try {
const element = document.getElementsByClassName("rti--input")[0];
const tagElement = element.parentElement;
console.log(tagElement);
tagElement.setAttribute("id", "tag-input");
} catch (error) {
console.log("err", error);
}
}, []);
return (


<TagsInput
{...props}
classNames="tag-cls input-cls"
separators={["Enter", ","]}
/>
<em style={{ fontWeight: "lighter", fontSize: 10 }}>
press enter or comma to add new tag


);
};

export default TagInput;
`

CSS :

`.rti--input::placeholder {
color: #a6a1a1 !important;
font-feature-settings: "clig" off, "liga" off;
/* Desktop/Text Small /
font-family: Poppins;
font-size: 15px !important;
font-style: normal;
font-weight: 300 !important;
line-height: 24px; /
160% */
letter-spacing: 0.75px;
}

#tag-input {
border: 1px solid #ccc;
border-radius: 8px;
height: 57px;
box-shadow: none !important;
}`

It works for me

@henriqwe
Copy link

henriqwe commented Jun 10, 2024

image

 .rti--container {
  --rti-border: #e6e6e6 !important;
  --rti-main: none !important;
}

.rti--container:focus-within {
  border: 1px solid #e6e6e6 !important;
} 

1° - Use the same border color in container and container:focus-within
2° - set none !important in rti-main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants