sample("Default", slug: "default") do
render NitroKit::Textarea.new(
id: "gallery-textarea-default",
aria: { label: "Profile bio" },
name: "profile[bio]",
value: "Building reliable interfaces for analytical software.",
rows: 4
)
end
sample("Empty", slug: "empty") do
render NitroKit::Textarea.new(
id: "gallery-textarea-empty",
aria: { label: "Invitation message" },
name: "invitation[message]",
value: "",
placeholder: "Add an optional welcome message"
)
end
sample("Constrained", slug: "constrained") do
render NitroKit::Textarea.new(
id: "gallery-textarea-constrained",
aria: { label: "Incident summary" },
name: "incident[summary]",
value: "Customer impact was limited to delayed notifications.",
required: true,
rows: 6,
cols: 48,
minlength: 20,
maxlength: 280,
wrap: :hard
)
end