Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/native-placeholder-styling.md
1---2title: Use ::placeholder for Input Styling3impact: LOW4tags: native, placeholder, input5---67## Use ::placeholder for Input Styling89Use ::placeholder for input placeholder styling, not wrapper elements.1011**Incorrect (custom placeholder node):**1213```tsx14<div className={styles.inputWrapper}>15{!value && <span className={styles.placeholder}>Enter text...</span>}16<input value={value} />17</div>18```1920**Correct (native ::placeholder):**2122```css23input::placeholder {24color: var(--gray-9);25opacity: 1;26}27```28