react tailwindcss (2) 썸네일형 리스트형 Tailwindcss + Checkbox export default function CheckBox(props: IProps) { const [checked, setChecked] = useState(props.checked); const _onChange = () => { setChecked(!checked); } return ( );} 체크박스의 색상이 변경되지 않는 문제Tailwind CSS에서 요소는 기본 스타일이 브라우저에 의해 지정되어 있어서, text-color-* 같은 색상 클래스가 적용되지 않는다. 해결방법accent-color-*을 추가하면 체크박스의 체크 색상을 변경할 수 있다. Vite + React + tailwind CSS Vite + React + Typescript 설정npm create vite@latest tailwind CSS 설치npm install tailwindcss postcss, autoprefixer 설치npm install -D postcss autoprefixer postcss.config.js 및 tailwind.config.js 생성npx tailwindcss init -p tailwind.config.js 작성/** @type {import('tailwindcss').Config} */export default { content: ["./src/**/*.{js,jsx,ts,tsx}"], theme: { extend: {}, }, plugins: [],} index.css 작성@.. 이전 1 다음