正在自动登录…
← 返回项目列表lucasmarkes/
lucasmarkes/ hairline
提供三十三个等距线条图形,可响应指针交互,适用于 React 或任何有 DOM 的环境,用于增强网页视觉体验。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/16 22:21:54 · 查看原文
- 累计 Stars
- 2,651
- 当前热度
- 7~30 天 · 小火
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/10/16 22:21:54
- 使用方式
可通过 npm 安装,支持 React 组件或直接操作 DOM 的函数式使用。
查看 README 依据
 Live, with a slider for `intensity`: **[hairline.lucasmarkes.com](https://hairline.lucasmarkes.com)** ## Install ```sh npm i @lucasmarkes/hairline ``` No dependencies. ESM only. React 18 or later is an optional peer, needed only by `@lucasmarkes/hairline/react`. With shadcn, which adds the package and a wrapper that reads your theme's tokens: ```sh
npx shadcn@latest add https://hairline.lucasmarkes.com/r/hairline.json ``` ## Use ### React ```tsx import { Terrain } from "@lucasmarkes/hairline/react"; export function Hero() { return <Terrain />; } ``` The figure fills its parent's width at a 5:4 aspect ratio. The entry is a client module, so a Server Component can render it with no `"use client"` of its own. Every component takes the options below and every `<div>` attribute, and forwards its ref to the `<div>`. ### Anything else ```ts import { terrain } from "@lucasmarkes/hairline";
- 部署要求
需要 ESM 环境,React 18 或更高版本为可选依赖,仅在使用 React 组件时需要。
查看 README 依据
 Live, with a slider for `intensity`: **[hairline.lucasmarkes.com](https://hairline.lucasmarkes.com)** ## Install ```sh npm i @lucasmarkes/hairline ``` No dependencies. ESM only. React 18 or later is an optional peer, needed only by `@lucasmarkes/hairline/react`. With shadcn, which adds the package and a wrapper that reads your theme's tokens: ```sh
- 已知限制
函数式用法需要 DOM,服务端渲染时组件为空框。
查看 README 依据
- **Server rendering.** On the server a component is an empty box with a 5:4 aspect ratio, so nothing shifts when it draws. The functions need a DOM: call them in an effect, in `onMount`, or in a script after the element. - **Shadow DOM.** A figure mounted inside a shadow root styles itself there. ## Make your own
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/10/1 21:52:19
- 首次达标收录
- 2026/10/9 11:44:24
- 统计更新时间
- 2026/10/22 19:25:30
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
模型评估
值得看加权总分 3.9 / 5
由 Jev 模型根据仓库描述与 README 评估,2026/10/16 20:36:28 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。
仓库信息
- 最近推送
- 2026/10/15 04:33:03
- 许可证标识
- MIT
- Fork 数
- 165
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:小火
首次发现项目