Цю сторінку ще не перекладено українською, тому нижче англійська версія.
64 записів для 80 методи. Кожен запис виконує свій приклад на цій сторінці й показує його код.
| Widgets inside widgets | Widgets nest: a widget body is HTML, so tabs can hold an accordion that holds a table, a list group and a panel. |
| html() | The widget helper: html()->tabs(), ->modal(), ->select_box()... return HTML strings in the markup of the current css framework. |
| accordion() | An accordion: one collapsible item per array entry, title => body. |
| carousel() | An image carousel with captions, indicators and arrows. |
| collapse() | A block shown and hidden by a button (more filters, details). |
| dd_table() | Two-column content (a profile, an order summary) as a definition list, field => value. |
| grid() | Rows and columns of the Bootstrap grid from an array: equal widths unless a cell sets col. |
| jumbotron() | A large hero box with a heading and a body. |
| map() | A map (maps plugin): html()->map($spec) is _class('maps')->render($spec); one div with the spec as JSON, drawn by the yf_maps starter. |
| map_view() | Rows with coordinates on one map (maps plugin): each row becomes a marker; clustered and fitted to the points. |
| panel(), card() | A box with a title and a body: a panel under Bootstrap 3, a card under 5 (card() is the same call under its Bootstrap 5 name). |
| simple_table() | A two-column key / value table from an array, with callbacks for the key cell and row or cell attributes. |
| thumbnails() | A grid of image thumbnails with optional titles and captions. |
| well() | A shaded box around content. |
| breadcrumbs() | A breadcrumb trail; the last item without a link is the current page. |
| dropdown() | A dropdown button with a menu of links, headers and dividers; optionally split. |
| menu() | A navbar menu built from a flat id => item list with parent_id: top items with dropdowns. |
| navbar() | A navbar with a brand and links; under Bootstrap 5 also collapse, dark, right-aligned items, dropdowns and an offcanvas menu. |
| navlist() | A vertical list of links with chevrons, the side lists of the docs. |
| pagination() | A pager from page => link pairs with Prev / Next. |
| tabs() | Tabs: one tab per array item, title => content. |
| alert() | An alert box with a heading and a body, closable. |
| modal(), modal_button() | A modal dialog (header, body, footer) and the button that opens it. |
| offcanvas(), offcanvas_button() | A side panel that slides in (filters, a mobile menu) and the button that opens it. |
| progress_bar() | A progress bar; several values stack in one bar. |
| toast(), toast_container() | Notices that show and hide themselves (Bootstrap 5 toasts) in a fixed corner container. |
| li() | A plain <ul> list, items with optional links, badges and nested sub lists. |
| list_group() | A list group: lines with badges, states and colours. |
| media_objects() | Media objects (an image beside a heading and text) nested by parent_id, e.g. comment threads. |
| tree(), li_tree() | An editable tree (drag and drop, expand / collapse) from a flat id => item list with parent_id; li_tree() is the nested <ul> without the editor. |
| button_box(), button_split_box() | A dropdown button that sets a hidden input; button_split_box() splits the button from its caret. |
| button_radio_box(), button_check_box() | Radios or check boxes drawn as a group of toggle buttons. |
| button_yes_no_box(), button_allow_deny_box() | Yes / No and Allow / Deny as two toggle buttons, from the pair data handlers. |
| check_box() | A bare check box with its label. |
| div_box() | A Bootstrap dropdown that sets a hidden input: the choice shows on the toggle. |
| input() | A bare <input> (no form row). |
| list_box() | A styled select of bootstrap-form-helpers (bfh-selectbox) with a hidden input; the country boxes use it. |
| multi_check_box() | A bare group of check boxes from value => label pairs. |
| radio_box() | A bare group of radio buttons (no form row). |
| select_box(), multi_select(), multi_select_box() | A bare <select> (no form row) from value => text pairs; multi_select() / multi_select_box() post name[]. |
| textarea() | A bare <textarea> (no form row); the value is escaped. |
| chosen_box() | A searchable select on Chosen 1.7 (jQuery). |
| date_box(), time_box() | Day, month and year selects (date_box()) or hour, minute, second selects (time_box()) named date_* / time_*. |
| date_box2(), time_box2(), datetime_box2() | Date, time and date-time selects posting name[year], name[month]... (what form()->date_box() renders). |
| date_picker() | Deprecated: a read-only text field with the jQuery UI datepicker (Y-m-d). Use form()->datetime_select(). |
| image_select_box() | Pick an image from thumbnails (jQuery image picker on a select). |
| phone_box() | A phone input with a country flag picker and the number formatted as typed (intl-tel-input, jQuery). |
| select2_box() | A searchable select on Select2 3.5 (jQuery). |
| tom_select_box(), tags_box(), tom_select_tags(), tom_select_query(), tom_select_send() | Tom Select without jQuery: a searchable select (tom_select_box()), a tags input (tags_box()), and the server helpers of tags and remote search. |
| a() | A link styled as a small button, with icons; a($href, $title, $icon, $text, $class_add, $target, $no_text) or one array. |
| badge() | A coloured badge or label with escaped text. |
| btn_active() | A small green / yellow toggle button showing whether an item is active (table2 btn_active short). |
| button() | A button, or a link styled as one, in Bootstrap colours and sizes. |
| country() | The flag of a country code, or a link with the flag, the code and the country name. |
| fa_icon_class() | A stored icon class as it is shown: a bare Font Awesome name (fa-star, what icon_select_box() saves) gets the base class fa; any other value is returned as it is. Menus, category items, trees and table2 icon() use it. |
| icon() | An icon with an optional title and text: icon($class, $title, $text, $class) or one array. |
| ip() | An IP address with the flag and name of its country (GeoIP), linked to an IP lookup site. |
| module_menu() | A row of a() buttons for the actions of an admin module; the button of the current action is disabled and highlighted. |
| placeholder() | Skeleton lines shown while content loads (Bootstrap 5 placeholders). |
| ratio() | A box that keeps an aspect ratio for an iframe, video or map. |
| spinner() | A loading indicator; with class_add htmx-indicator it shows while an htmx request runs. |
| tooltip() | A help icon that shows a text in a popover on hover (the tip icons of form rows). |
| tooltip_html() | Tooltip text as safe HTML: the text of tooltip() under a Tailwind CSS driver goes through it. |
| ui_class() | The classes of a user template's own markup per CSS framework driver: the Bootstrap classes under bs3 / bs4 / bs5, the class map's component under a UI plugin's driver (tw). For templates: {execute(html,ui_class,bs=pull-right;c=float;v=right)}. Escaped. |