Scroll Area
Fine Clay style custom scroll area component with soft scrollbar styling.
垂直滚动
Notifications
New message from Alice
2 min ago
Your order has been shipped
15 min ago
Password changed successfully
1 hour ago
New comment on your post
2 hours ago
Weekly report is ready
3 hours ago
New follower: @bob
5 hours ago
Payment received
Yesterday
System maintenance scheduled
Yesterday
New feature available
2 days ago
Account verified
3 days ago
水平滚动
带轨道颜色的滚动条
自定义轨道和滑块颜色
Clay 风格粗滑块
符合 Fine Clay 主题的粗边框滚动条
双向滚动
长列表
代码块示例
深色背景使用亮色滚动条
import { useState, useEffect } from 'react'
function useLocalStorage<T>(
key: string,
initialValue: T
): [T, (value: T) => void] {
const [storedValue, setStoredValue] = useState<T>(() => {
if (typeof window === 'undefined') {
return initialValue
}
try {
const item = window.localStorage.getItem(key)
return item ? JSON.parse(item) : initialValue
} catch (error) {
console.error(error)
return initialValue
}
})
const setValue = (value: T) => {
try {
setStoredValue(value)
if (typeof window !== 'undefined') {
window.localStorage.setItem(key, JSON.stringify(value))
}
} catch (error) {
console.error(error)
}
}
return [storedValue, setValue]
}
export default useLocalStorage聊天记录示例
Team Chat
Alice
Hey everyone! How's the project going?
Hi Alice! Making good progress on the UI components.
Bob
Just finished the API integration!
Alice
That's awesome! Can we schedule a demo tomorrow?
Sure, morning works best for me.
Bob
10am works for me too.
Alice
Perfect, I'll send the calendar invite.
Sounds good!
Bob
Looking forward to it!
Alice
By the way, the client loved the last demo!
迷你滚动条
更小巧精致的滚动条样式