Skip to content
weftGitHub

Components

The building blocks: buttons, fields, overlays, layout, data and dates. Install @weft-js/warp and import what you use.

Actions

Forms

InputOne line of text: a name, an email, a URL.
TextareaSeveral lines of text that grow as people write.
SearchA text field for finding things, with a search icon and a clear button.
SelectPick one value from a list. A menu on a desktop, a sheet on a phone.
CheckboxA yes or no that takes effect when the form is saved.
RadioOne choice in a set. Give every radio in the set the same name.
RadioGroupPick exactly one from a short list where every option is on show.
SwitchTurns a setting on or off straight away, with no Save button.
SliderPick a number or a range by dragging, when about right is good enough.
SegmentedA row of two to five short options where exactly one is on.
FieldThe frame every field shares: label, icon, hint, error. Wrap your own control in it.
CompactSelectA small Select with no floating label, for table rows, pagers and toolbars.
NumberFieldA number you can type or step, with arrow keys and two buttons.

Overlays

Feedback

Content

Layout

Data

Dates and time

CalendarA full calendar with month, week, day, agenda, timeline and year views.
DateFieldType a date or pick one from a calendar in a popover.
DateRangeFieldPick a start and end date, with presets like Last 30 days and an optional comparison.
DateTimeFieldOne field for a date and a time, with the calendar beside a list of times.
TimeFieldType a time or pick one from a list, in the 12 or 24 hour clock.
DurationFieldEnter a length of time in days, hours, minutes or seconds.
InlineCalendarA calendar that is always on the page, for one day, several days or a range.
MonthPickerPick a month from a year grid.
WeekPickerPick a whole week from a calendar.
PeriodPickerPick a year, quarter, month or week from one control.
RecurrenceFieldBuild a repeating schedule, with the rule in plain words and the next dates listed.

Rich fields

PhoneFieldA phone number with a country picker. Formats as people type and stores the full international number.
CountrySelectPick a country from a searchable list, named in the reader's language.
LanguageSelectPick a language. Each one also shows its own name, so people can find theirs.
CurrencySelectPick a currency by name, code or symbol.
TimeZoneSelectPick a time zone by city or offset. The reader's own zone comes first.
AddressFieldA postal address whose fields, order and labels follow the country.
PlaceLookupInputFind a place, like a city or an airport, through your own search.
PaymentCardInputA frame around your payment provider's card field, so it matches the rest of the form.
CardNumberTextShows a saved card safely: its brand, last four digits and expiry.
CodeInputA code field with colours, line numbers and Tab that indents.
JsonEditorA code field for JSON that points to the line with the mistake.
KeyValueEditorA small table of names and values, like environment variables or headers.
MentionsInputA text box where @ tags people and # links projects.
RichTextEditorFormatted text with a toolbar, Markdown shortcuts and / for blocks.
MarkdownEditorWrite Markdown beside a live preview.
SignaturePadSign by drawing or by typing a name.

Canvas and dithering