เครื่องมือสร้าง Lorem Ipsum
สร้างข้อความตัวอย่าง Lorem Ipsum โดยกำหนดจำนวนย่อหน้าและคำได้
ข้อความที่สร้าง
Nulla deserunt eiusmod qui sed dolore ullamco non. Duis lorem sint aute minim culpa id ipsum duis. Aliqua sed magna ex in tempor dolore tempor amet dolore occaecat proident do consequat duis aliquip. Sint lorem nostrud aliqua sit culpa tempor occaecat incididunt in aliqua labore et in mollit.
Pariatur sunt nostrud labore deserunt est aliqua occaecat. Dolore ad aute consequat quis nisi nostrud reprehenderit laborum mollit labore laboris sed laborum nisi amet dolor. Aute non ullamco adipiscing in amet ut anim ullamco cillum enim consequat proident incididunt laborum.
Eu ut enim non mollit officia non do sit sit. Nulla esse sint mollit aliqua veniam dolor ut anim pariatur. Excepteur minim veniam elit pariatur in mollit eu proident deserunt dolore enim id.Lorem Ipsum คืออะไร?
Lorem ipsum คือข้อความตัวอย่างที่ใช้ในการออกแบบและการเรียงพิมพ์เพื่อเติมพื้นที่ layout ก่อนที่จะมีเนื้อหาจริง ข้อความมาตรฐานเริ่มต้นด้วย "Lorem ipsum dolor sit amet, consectetur adipiscing elit" และถูกใช้มาตั้งแต่ศตวรรษที่ 16 เมื่อช่างพิมพ์ที่ไม่ทราบชื่อนำส่วนต่างๆ จากงาน "De Finibus Bonorum et Malorum" (45 ปีก่อนคริสตกาล) ของซิเซโรมาสับเปลี่ยนเพื่อสร้างตัวอย่างแบบอักษร ข้อความนี้รอดจากการเปลี่ยนผ่านสู่การเรียงพิมพ์ดิจิทัลในทศวรรษ 1960 และกลายเป็นข้อความเติมพื้นที่เริ่มต้นในซอฟต์แวร์จัดพิมพ์บนเดสก์ท็อปอย่าง Aldus PageMaker
จุดประสงค์ของ Lorem ipsum คือการจำลองน้ำหนักทางภาพและการกระจายของข้อความที่อ่านได้ โดยไม่ทำให้ผู้ดูเสียสมาธิไปกับเนื้อหาจริง เนื่องจากคำภาษาละตินมีความถี่ของตัวอักษรและความยาวของคำที่หลากหลาย จึงทำให้ได้บล็อกข้อความที่ดูสมจริง นักออกแบบใช้ข้อความนี้เพื่อประเมินตัวอักษร ระยะห่าง และ layout ในขณะที่เนื้อหายังอยู่ในขั้นตอนการเขียนหรืออนุมัติ ซึ่งช่วยให้ทีมตัดสินใจเรื่องพื้นที่ว่าง จำนวนคอลัมน์ และขนาดอักษรได้ก่อนที่เนื้อหาจะพร้อม
ข้อความต้นฉบับจากงานของซิเซโร (เล่มที่ 1 ตอนที่ 1.10.32) กล่าวถึงทฤษฎีเกี่ยวกับความสุขและความเจ็บปวด ข้อความที่นำมาสับเปลี่ยนเพื่อใช้เป็น Lorem ipsum นั้นไม่ถูกหลักไวยากรณ์ภาษาละติน มีการสลับลำดับ ตัดทอน และผสมกับส่วนที่แต่งขึ้นใหม่ ซึ่งเป็นเจตนา เพราะข้อความควรดูน่าเชื่อเมื่อมองผ่านๆ แต่ไม่ควรสื่อความหมายที่อาจส่งผลต่อการรับรู้ของผู้ดูต่อการออกแบบ
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
ทำไมต้องใช้เครื่องมือสร้าง Lorem Ipsum นี้?
การสร้างข้อความตัวอย่างด้วยมือนั้นน่าเบื่อและเสี่ยงต่อความผิดพลาด เครื่องมือนี้ให้ข้อความเติมพื้นที่ในจำนวนที่คุณต้องการพอดีในรูปแบบที่คุณต้องการ เลือกระหว่างย่อหน้า ประโยค หรือจำนวนคำ ปรับผลลัพธ์ได้ทันทีโดยไม่ต้องโหลดหน้าใหม่ และคัดลอกทุกอย่างไปยังคลิปบอร์ดได้ด้วยคลิกเดียว ไม่ว่าคุณจะสร้าง UI prototype ป้อนข้อมูลทดสอบในฐานข้อมูล หรือทดสอบ pipeline การประมวลผลข้อความ การมีข้อความตัวอย่างที่เชื่อถือได้และกำหนดค่าได้จะช่วยลดแรงเสียดทานเล็กๆ น้อยๆ ที่เกิดขึ้นซ้ำในกระบวนการทำงานของคุณ
กรณีการใช้งานเครื่องมือสร้าง Lorem Ipsum
Lorem Ipsum เทียบกับข้อความตัวอย่างแบบอื่น
Lorem ipsum เป็นข้อความตัวอย่างที่ใช้กันมากที่สุด แต่มีทางเลือกอื่นหลายแบบ
| ประเภท | คำอธิบาย | เหมาะสำหรับ | ข้อเสีย |
|---|---|---|---|
| Lorem Ipsum (classical) | ภาษาละตินที่สับเปลี่ยนจาก De Finibus ของซิเซโร | เป็นสากล ไม่ขึ้นกับภาษา เป็นที่คุ้นเคยสำหรับลูกค้า | อาจดูซ้ำซากเมื่อใช้ในปริมาณมาก |
| Hipster Ipsum | ข้อความเติมพื้นที่สไตล์งานฝีมือและอาร์ติซาน | เพิ่มความสนุกในการทำ mockup ภายใน | น่าเสียสมาธิในการนำเสนอต่อลูกค้า |
| Bacon Ipsum | ข้อความตัวอย่างธีมเนื้อสัตว์ | ตลกขบขันสำหรับ prototype ไม่เป็นทางการ | ไม่เป็นมืออาชีพสำหรับงานส่วนใหญ่ |
| Real content draft | เนื้อหาร่างจริง แม้จะยังไม่สมบูรณ์ | ทดสอบความยาวและน้ำเสียงของเนื้อหาจริง | ผู้ตรวจสอบจะมุ่งความสนใจไปที่ถ้อยคำแทนที่จะเป็น layout |
ตัวอย่างโค้ด
วิธีสร้าง Lorem ipsum ด้วยโปรแกรมในภาษาและสภาพแวดล้อมต่างๆ:
// Generate N paragraphs of lorem ipsum in the browser
function loremParagraph(sentenceCount = 5) {
const words = [
'lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur',
'adipiscing', 'elit', 'sed', 'do', 'eiusmod', 'tempor',
'incididunt', 'ut', 'labore', 'et', 'dolore', 'magna', 'aliqua',
]
const pick = () => words[Math.floor(Math.random() * words.length)]
const sentence = () => {
const len = 6 + Math.floor(Math.random() * 8)
const ws = Array.from({ length: len }, pick)
ws[0] = ws[0][0].toUpperCase() + ws[0].slice(1)
return ws.join(' ') + '.'
}
return Array.from({ length: sentenceCount }, sentence).join(' ')
}
console.log(loremParagraph(3))
// → "Magna dolor ipsum sit amet labore. Elit tempor ut sed consectetur. ..."import random
WORDS = (
"lorem ipsum dolor sit amet consectetur adipiscing elit sed do "
"eiusmod tempor incididunt ut labore et dolore magna aliqua"
).split()
def lorem_paragraph(sentences: int = 5) -> str:
result = []
for _ in range(sentences):
length = random.randint(6, 14)
words = [random.choice(WORDS) for _ in range(length)]
words[0] = words[0].capitalize()
result.append(" ".join(words) + ".")
return " ".join(result)
print(lorem_paragraph(3))
# → "Amet consectetur sed ipsum dolor labore. Elit do magna ut lorem. ..."package main
import (
"fmt"
"math/rand"
"strings"
)
var words = []string{
"lorem", "ipsum", "dolor", "sit", "amet", "consectetur",
"adipiscing", "elit", "sed", "do", "eiusmod", "tempor",
"incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua",
}
func loremSentence() string {
n := 6 + rand.Intn(8)
ws := make([]string, n)
for i := range ws {
ws[i] = words[rand.Intn(len(words))]
}
ws[0] = strings.ToUpper(ws[0][:1]) + ws[0][1:]
return strings.Join(ws, " ") + "."
}
func loremParagraph(sentences int) string {
parts := make([]string, sentences)
for i := range parts {
parts[i] = loremSentence()
}
return strings.Join(parts, " ")
}
func main() {
fmt.Println(loremParagraph(3))
// → "Lorem sit amet consectetur labore. Elit magna do ipsum tempor. Aliqua ut dolore sit eiusmod."
}# Node.js one-liner using the "lorem-ipsum" npm package npx lorem-ipsum --count 3 --units paragraphs # Python one-liner using the "lorem" PyPI package python3 -c "import lorem; print(lorem.paragraph())" # Or use curl to fetch from a public API curl -s "https://loripsum.net/api/3/short/plaintext"