定制 brandymedia/turbine-ui-core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

brandymedia/turbine-ui-core

Composer 安装命令:

composer require brandymedia/turbine-ui-core

包简介

Tailwind CSS styled Laravel Blade components

README 文档

README

Turbine UI is a Laravel Blade & Tailwind CSS UI component library that helps you build elegant and responsive user interfaces that'll make your pages pop. Say goodbye to designer's block forever.

Release Notes

v2.1.1

Added

  • x-t-alert now supports a titleLevel prop to control semantic heading level (1-6).

Fixed

  • Turbine UI script directive now uses a host-relative path for improved environment compatibility.
  • Accessibility improvements for interactive controls:
    • Added explicit accessible labels and button types for dismiss controls in alert, toast, modal, and sidebar.
    • Added an accessible name/title for the theme switcher trigger button.
  • Improved list-group semantics for better accessibility in common usage patterns.

Upgrade steps

After upgrading, republish JS assets and clear caches:

php artisan vendor:publish --tag=turbine-ui-js --force
php artisan optimize:clear

Documentation

Download

Turbine UI is free and can be downloaded via composer:

composer require brandymedia/turbine-ui-core

Installation

Requirements

  • MUST be using at least Laravel 10
  • MUST be using at least PHP 8.1
  • MUST be using Tailwind CSS

Tailwind CSS Setup

Once you've installed Turbine UI you'll need to update your tailwind.config.js file.

In the 'content' section, add ./vendor/brandymedia/turbine-ui-core//*.php** as a new line:

content: [
    '...',
    './vendor/brandymedia/turbine-ui-core/**/*.php',
],

You'll also need to make sure you're using the Tailwind Forms plugin in your tailwind.config.js file. This is normally included by default when using a starter kit such as Laravel Breeze.

import forms from '@tailwindcss/forms';

export default {
    ...
    plugins: [forms],
};

Then in development run:

npm run dev

Or in production run:

npm run build

Themes

Turbine UI comes with 2 themes by default with further themes in development:

  • Kinetic (default)
  • Primal (Pro)

You can switch themes by adding the TURBINE_UI_THEME key to your .env file:

TURBINE_UI_THEME=kinetic|primal

You can also edit themes by publishing the packages assets:

php artisan vendor:publish --tag=turbine-ui-themes

This makes local copies of the themes in the ./resources/views/vendor/turbine-ui/themes directory which can then be edited to meet your requirements.

Note

To use local themes, you will need to update your tailwind.config.js file.

In the 'content' section, add ./resources/views//*.php** as a new line:

content: [
    '...',
    './resources/views/**/*.php',
],

Variants

Think of variants as colour palettes. The default themes already come with several predefined variants but you can create your own, or even overwrite existing one.

To create a new variant, run the following command in your CLI:

php artisan turbine:create-variant

You will then be prompted to enter the variants name. To overwrite an existing theme level variant, use the same name for example primary.

Once the new variant has been created you will find it here ../resources/views/vendor/turbine-ui/variants.

Note

To use local variants, you will need to update your tailwind.config.js file.

In the 'content' section, add ./resources/views//*.php** as a new line:

content: [
    '...',
    './resources/views/**/*.php',
],

You can now use your new variant on your components using kebab-case formatting.

JavaScript

Note

Some of the Turbine UI components require JavaScript to function properly.

You'll need to first publish the js files:

php artisan vendor:publish --tag=turbine-ui-js --force

Then add the Turbine UI blade directive to your head:

@turbineUI

If you update Turbine UI and interactive components appear stale, clear cached files:

php artisan optimize:clear

Alert title heading level

You can control alert title heading semantics with titleLevel:

<x-t-alert title="Important update" titleLevel="2" variant="brand">
    This alert keeps heading hierarchy consistent with your page structure.
</x-t-alert>

Components

You can view the documentation for each of the components here

brandymedia/turbine-ui-core 适用场景与选型建议

brandymedia/turbine-ui-core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.08k 次下载、GitHub Stars 达 82, 最近一次更新时间为 2023 年 11 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 brandymedia/turbine-ui-core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 brandymedia/turbine-ui-core 我们能提供哪些服务?
定制开发 / 二次开发

基于 brandymedia/turbine-ui-core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.08k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 82
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 82
  • Watchers: 4
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-06