Skip to content
Twentyfirst UIHalo

Separator

Foundations · Separator, Label, AspectRatio, Input, Button

View as Markdown

Small layout primitives.

  • Separator: a hairline between groups, horizontal or vertical, optionally with a label in the middle ("or").
  • Label: the field label on its own, with a required mark or a muted hint ("optional").
  • AspectRatio: a box that keeps its ratio (16 : 9 by default) for images, video and placeholders.
DocsStatusChangelog

Props

Separator

PropTypeNotes
orientation?"horizontal" | "vertical"
label?stringText in the middle of the line ("or").
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

Label

PropTypeNotes
htmlFor?string
required?boolean
hint?ReactNodeMuted text after the label ("optional").
children?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

AspectRatio

PropTypeNotes
ratio?numberWidth divided by height (default 16 / 9).
children?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

Input

PropTypeNotes
type?string
placeholder?string
value?string
defaultValue?string
disabled?boolean
onChange?(e: ChangeEvent<HTMLInputElement>) => void
label?string
hint?string
error?string
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

Button

PropTypeNotes
variant?"primary" | "secondary" | "soft" | "ghost" | "danger" | "danger-solid"
size?"md" | "sm"
icon?IconName
iconRight?IconName
disabled?boolean
type?"button" | "submit" | "reset"
onClick?(e: MouseEvent<HTMLButtonElement>) => void
children?ReactNode
asChild?booleanRender the single child element (a link, a router Link) with the button's look instead of a <button>.
id?string
name?stringForm field name and value, sent with the form when this button submits it.
value?string
form?stringThe id of the form this button belongs to, when it sits outside it.
title?string
tabIndex?number
autoFocus?boolean
aria-label?string
aria-labelledby?string
aria-describedby?string
aria-expanded?boolean | "true" | "false"For disclosure and menu triggers: whether what the button controls is open.
aria-controls?string
aria-haspopup?boolean | "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog"
aria-pressed?boolean | "true" | "false" | "mixed"For toggle buttons.
aria-current?boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time"
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.