create-components
Creates Leptos component implementations from daisyUI style guide documentation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Creates Leptos component implementations from daisyUI style guide documentation
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generates component documentation from implementation for demo-macros parsing
Validates existing components against daisyUI style guide documentation
Fetches and splits the daisyUI style guide from the official LLM text file into organized sections
| name | create-components |
| description | Creates Leptos component implementations from daisyUI style guide documentation |
| disable-model-invocation | true |
This skill creates Leptos components based on the daisyUI style guide in .daisyui directory.
Check for .daisyui directory: Verify that the .daisyui directory exists in the project root.
install-component-guide skill first:
.daisyui style guide directory is not found. Please run the install-component-guide skill first to fetch and set up the daisyUI documentation."Read the rules: Review .claude/rules/components.md for detailed rules and best practices
Read the style guide: Reference the relevant component documentation from .daisyui/components/{component_name}.md
mkdir -p src/components/{component_name}
//! # daisyUI {ComponentName} Components
//!
//! For more information, see: https://daisyui.com/components/{component_name}/
mod component;
mod style;
pub use component::*;
pub use style::*;
Extract class names from .daisyui/components/{component_name}.md and create style enums:
/// # {ComponentName} Color Variants
#[derive(Clone, Debug, Default)]
pub enum {ComponentName}Color {
#[default]
Default,
// Add variants based on .daisyui documentation
}
impl {ComponentName}Color {
pub fn as_str(&self) -> &'static str {
match self {
{ComponentName}Color::Default => "",
// Map variants to CSS class strings
}
}
}
Refer to .claude/rules/components.md for complete style enum rules
use super::style::{ComponentColor, ComponentSize};
use crate::merge_classes;
use leptos::prelude::*;
/// # {ComponentName} Component
///
/// A reactive wrapper for daisyUI's {component_name} component.
///
/// ### Add to `input.css`
/// ```css
/// @source inline("{class_names}");
/// ```
///
/// ## Node References
/// - `node_ref` - References the `<{html_element}>` element
#[component]
pub fn {ComponentName}(
#[prop(optional, into)]
color: Signal<ComponentColor>,
#[prop(optional, into)]
node_ref: NodeRef<{HtmlElementType}>,
#[prop(optional, into)]
class: &'static str,
children: Children,
) -> impl IntoView {
view! {
<{html_element}
node_ref=node_ref
class=move || {
merge_classes!(
"{base_class}",
color.get().as_str(),
class
)
}
>
{children()}
</{html_element}>
}
}
Refer to .claude/rules/components.md for props rules, class merging, and documentation requirements
mod {component_name};
pub use {component_name}::*;
leptosfmt .
cargo clippy -- -D warnings
Add the component's CSS classes using @source inline() in the appropriate CSS file:
@source inline("component-name component-name-color1 component-name-color2 ...");
Component: src/components/button/ - Canonical example implementation
Rules: .claude/rules/components.md - Complete rules and best practices
Style Guide: .daisyui/components/{component_name}.md - daisyUI documentation
cat .daisyui/components/alert.md