คอมโพเนนต์ทั้งหมด
Brand marks
Wordmark, Degree และ Loop เครื่องหมายประจำแต่ละแบรนด์
ui/brand.tsxServer safeWordmark
ไม่ส่ง brand ไว้ wordmark จะเปลี่ยนตามแบรนด์ที่ใกล้ที่สุด ส่ง brand เพื่อปักไว้แบรนด์เดียว
aswinology
ASWINOLOGY / Lurnelle
aswinologyASWINOLOGY
Lurnelleaswinology
ASWINOLOGY / Lurnellecomponents
<Wordmark /> // follows data-brand
<Wordmark brand="aswinology" />
<Wordmark brand="lurnelle" />
<Wordmark suffix="components" as={Link} href="/" />Degree
เครื่องหมายองศาของ ASWINOLOGY° วงกลมเติมสี accent ขอบสีตัวอักษร ขนาดตามฟอนต์ของข้อความรอบๆ
The study of becoming
เติบโตทีละองศา
ใช้แบบไม่เติมสี 100 ในข้อความยาว
<h2>The study of becoming<Degree /></h2>
<span>100<Degree plain /></span>Loop
เส้น ℓ ที่ลากด้วยมือของ Lurnelle path ใช้ pathLength=1 จึงวาดด้วย strokeDashoffset จาก 1 ไป 0 ได้ทันที
import { gsap } from "gsap";
import { useGSAP } from "@gsap/react";
useGSAP(() => {
gsap.fromTo(".ds-loop path",
{ strokeDasharray: 1, strokeDashoffset: 1 },
{ strokeDashoffset: 0, duration: 1.6, ease: "power2.inOut" });
}, { scope });
<Loop width={4} />BrandOnly
แสดงเนื้อหาเฉพาะแบรนด์โดยไม่ต้องอ่านค่าใน JavaScript ใช้ display: contents จึงไม่กระทบเลย์เอาต์
ตอนนี้แสดง ASWINOLOGY° กระดาษอุ่น หมึกกราไฟต์ และองศาสีไลม์ตอนนี้แสดง Lurnelle หมอกสว่าง แก้ว ดินเหนียว และเส้น loop
<BrandOnly brand="aswinology">Soft Swiss, one lime degree.</BrandOnly>
<BrandOnly brand="lurnelle">Glass, clay and a loop.</BrandOnly>Props
| Prop | Type | Default | คำอธิบาย |
|---|---|---|---|
Wordmark.brand | "aswinology" | "lurnelle" | ตามแบรนด์ | ปักแบรนด์ หรือปล่อยให้ตาม data-brand |
Wordmark.suffix | ReactNode | - | คำต่อท้ายตัวโมโน เช่น components |
Wordmark.as | ElementType | "span" | เช่น a หรือ Link เมื่อเป็นลิงก์กลับหน้าแรก |
Degree.plain | boolean | false | ไม่เติมสี ใช้ในข้อความยาวหรือบนพื้นสี |
Loop.width | number | 3 | ความหนาเส้นในหน่วยของ viewBox |
BrandOnly.brand | "aswinology" | "lurnelle" | - | แสดงลูกเมื่อแบรนด์ตรง |
การเข้าถึง
- Degree และ Loop เป็นของตกแต่ง ซ่อนจากโปรแกรมอ่านหน้าจอแล้ว
- Wordmark มีชื่อแบรนด์ซ่อนไว้ให้โปรแกรมอ่านหน้าจอ เมื่อเป็นลิงก์ให้ใส่ aria-label ที่บอกปลายทาง
- เส้น Loop ไม่วาดซ้ำเมื่อผู้ใช้เลือกลดการเคลื่อนไหว