tabs
Github

    public function tabs()
    {
        $data = [
            'first' => 'first text',
            'second' => 'second text',
            'third' => 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. 
				Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. 
				Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. 
				Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably havent heard of them accusamus labore sustainable VHS.',
            'fourth' => '44444',
        ];
        return _class('html')->tabs($data, ['selected' => 'third']);
    }
    public function tabs($tabs = [], $extra = [])
    {
        $extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];

        $extra_by_id = [];
        if (isset($extra['by_id'])) {
            $extra_by_id = (array) $extra['by_id'];
            unset($extra['by_id']);
        }
        $links_prefix = $extra['links_prefix'] ?: 'tab_';

        $headers = [];
        $items = [];
        foreach ((array) $tabs as $k => $v) {
            $desc_raw = null;
            $disabled = null;
            if ( ! is_array($v)) {
                $content = $v;
                $v = [];
            } else {
                $content = $v['content'];
                $desc_raw = $v['desc_raw'];
                $disabled = $v['disabled'];
            }
            $content = trim($content);
            $_extra = (array) $extra_by_id[$k] + (array) $extra;
            if ($_extra['hide_empty'] && ! strlen($content)) {
                continue;
            }
            $name = $v['name'] ?: $k;
            $desc = $v['desc'] ?: ( ! $_extra['no_auto_desc'] ? ucfirst(str_replace('_', ' ', $name)) : $name);
            $id = preg_replace('~[^a-z0-9_-]+~i', '', $v['id'] ?: $links_prefix . $k);
            if (isset($_extra['selected'])) {
                $is_active = ($_extra['selected'] == $k);
            } else {
                $is_active = (++$i == 1);
            }
            if (isset($_extra['totals'][$name])) {
                $v['badge'] = (int) (isset($_extra['totals'][$name]['total']) ? $_extra['totals'][$name]['total'] : $_extra['totals'][$name]);
            }
            $badge = isset($v['badge']) ? ' <sup class="badge badge-' . ($v['class_badge'] ?: 'info') . '">' . $v['badge'] . '</sup>' : '';
            if ( ! $_extra['no_headers']) {
                $class_head = $v['class_head'] ?: $_extra['class_head'];
                $class_head .= $_extra['class_add_head'] ? ' ' . $_extra['class_add_head'] : '';
                if ($is_active) {
                    $class_head = trim('active ' . $class_head);
                }
                $_extra_head = (array) $_extra['tab_head'];
                $_extra_head['class'] = $_extra_head['class'] ?: $class_head;
                $headers[] =
                    '<li' . _attrs($_extra_head, ['id', 'class', 'style']) . '>
						<a ' . ( ! $disabled ? 'href="#' . fix_html_attr_id($id) . '" ' : '') . 'data-toggle="tab">' . ($desc_raw ?: t($desc)) . $badge . '</a>
					</li>';
            }
            $class_body = ($_extra['class'] ?: $v['class_body']) ?: $_extra['class_body'];
            $class_body = $class_body ?: 'tab-pane';
            $class_body .= $_extra['class_add_body'] ? ' ' . $_extra['class_add_body'] : '';
            if ($is_active || $_extra['show_all']) {
                $class_body = trim('active ' . $class_body);
            } else {
                $class_body = trim('fade ' . $class_body);
            }
            $_extra_body = (array) $_extra['tab_body'];
            $_extra_body['id'] = $_extra_body['id'] ?: $id;
            $_extra_body['class'] = $_extra_body['class'] ?: $class_body;
            $items[] = '<div' . _attrs($_extra_body, ['id', 'class', 'style']) . '>' . $content . '</div>';
        }
        $tabs_headers_class = 'nav nav-tabs' . ($extra['vertical_mode'] ? ' nav-stacked col-md-1' : '');
        $tabs_content_class = 'tab-content' . ($extra['vertical_mode'] ? ' col-md-11' : '');
        $body = [];
        $body[] = $headers ? '<ul id="' . $extra['id'] . '" class="' . $tabs_headers_class . '">' . implode(PHP_EOL, (array) $headers) . '</ul>' . PHP_EOL : '';
        $body[] = '<div id="' . $extra['id'] . '_content" class="' . $tabs_content_class . '">' . implode(PHP_EOL, (array) $items) . '</div>';
        return implode(PHP_EOL, $body);
    }
first text
second text
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably havent heard of them accusamus labore sustainable VHS.
44444