├── scripts ├── src │ ├── lib.rs │ └── bin │ │ └── templates │ │ └── base_styles.css └── Cargo.toml ├── .prettierignore ├── packages ├── leptos │ ├── utils │ │ ├── src │ │ │ ├── default.rs │ │ │ ├── new_york.rs │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── alert │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── card │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── badge │ │ ├── src │ │ │ ├── lib.rs │ │ │ ├── default.rs │ │ │ └── new_york.rs │ │ ├── Cargo.toml │ │ └── README.md │ └── button │ │ ├── src │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md ├── shadcn │ ├── src │ │ ├── commands │ │ │ ├── add.rs │ │ │ └── diff.rs │ │ ├── preflights.rs │ │ ├── commands.rs │ │ ├── lib.rs │ │ ├── utils.rs │ │ ├── utils │ │ │ ├── errors.rs │ │ │ ├── get_project_info.rs │ │ │ ├── logger.rs │ │ │ ├── spinner.rs │ │ │ └── highlighter.rs │ │ └── bin │ │ │ └── rust-shadcn.rs │ └── Cargo.toml ├── yew │ ├── aspect-ratio │ │ ├── src │ │ │ ├── default.rs │ │ │ ├── new_york.rs │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── table │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── alert │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── card │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── label │ │ ├── src │ │ │ ├── lib.rs │ │ │ ├── default.rs │ │ │ └── new_york.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── badge │ │ ├── src │ │ │ ├── lib.rs │ │ │ ├── default.rs │ │ │ └── new_york.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── separator │ │ ├── src │ │ │ ├── lib.rs │ │ │ ├── default.rs │ │ │ └── new_york.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── avatar │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── button │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── skeleton │ │ ├── src │ │ │ ├── lib.rs │ │ │ ├── default.rs │ │ │ └── new_york.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── input │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── pagination │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── switch │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ ├── textarea │ │ ├── src │ │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md │ └── breadcrumb │ │ ├── src │ │ └── lib.rs │ │ ├── Cargo.toml │ │ └── README.md └── registry │ ├── Cargo.toml │ └── src │ ├── registry_blocks.rs │ ├── registry_charts.rs │ ├── registry_hooks.rs │ ├── registry_examples.rs │ ├── registry_styles.rs │ ├── registry_frameworks.rs │ ├── registry_ui.rs │ └── lib.rs ├── book ├── src │ ├── getting-started │ │ └── README.md │ ├── components │ │ ├── README.md │ │ ├── label.md │ │ └── separator.md │ └── SUMMARY.md ├── theme │ ├── theme.css │ ├── theme.js │ ├── tabs.css │ ├── trunk.css │ └── trunk.js └── book.toml ├── book-examples ├── leptos │ ├── src │ │ ├── default │ │ │ ├── components.rs │ │ │ ├── badge │ │ │ │ ├── badge.rs │ │ │ │ ├── badge_outline.rs │ │ │ │ ├── badge_secondary.rs │ │ │ │ └── badge_destructive.rs │ │ │ ├── button │ │ │ │ ├── button.rs │ │ │ │ ├── button_ghost.rs │ │ │ │ ├── button_link.rs │ │ │ │ ├── button_outline.rs │ │ │ │ ├── button_secondary.rs │ │ │ │ ├── button_destructive.rs │ │ │ │ ├── button_with_icon.rs │ │ │ │ ├── button_loading.rs │ │ │ │ ├── button_icon.rs │ │ │ │ └── button_as_child.rs │ │ │ ├── components │ │ │ │ └── ui.rs │ │ │ ├── alert │ │ │ │ ├── alert.rs │ │ │ │ └── alert_destructive.rs │ │ │ ├── card.rs │ │ │ ├── alert.rs │ │ │ ├── badge.rs │ │ │ └── button.rs │ │ ├── new_york │ │ │ ├── components.rs │ │ │ ├── badge │ │ │ │ ├── badge.rs │ │ │ │ ├── badge_outline.rs │ │ │ │ ├── badge_secondary.rs │ │ │ │ └── badge_destructive.rs │ │ │ ├── button │ │ │ │ ├── button.rs │ │ │ │ ├── button_link.rs │ │ │ │ ├── button_ghost.rs │ │ │ │ ├── button_outline.rs │ │ │ │ ├── button_secondary.rs │ │ │ │ ├── button_destructive.rs │ │ │ │ ├── button_with_icon.rs │ │ │ │ ├── button_loading.rs │ │ │ │ ├── button_icon.rs │ │ │ │ └── button_as_child.rs │ │ │ ├── components │ │ │ │ └── ui.rs │ │ │ ├── alert │ │ │ │ ├── alert.rs │ │ │ │ └── alert_destructive.rs │ │ │ ├── card.rs │ │ │ ├── alert.rs │ │ │ ├── badge.rs │ │ │ └── button.rs │ │ ├── main.rs │ │ ├── app.rs │ │ ├── default.rs │ │ └── new_york.rs │ ├── Trunk.toml │ ├── index.html │ ├── main.js │ └── Cargo.toml └── yew │ ├── src │ ├── default │ │ ├── components.rs │ │ ├── input │ │ │ ├── input_form.rs │ │ │ ├── input.rs │ │ │ ├── input_disabled.rs │ │ │ ├── input_file.rs │ │ │ ├── input_with_button.rs │ │ │ ├── input_with_label.rs │ │ │ └── input_with_text.rs │ │ ├── switch │ │ │ ├── switch_form.rs │ │ │ └── switch.rs │ │ ├── badge │ │ │ ├── badge.rs │ │ │ ├── badge_outline.rs │ │ │ ├── badge_secondary.rs │ │ │ └── badge_destructive.rs │ │ ├── textarea │ │ │ ├── textarea_form.rs │ │ │ ├── textarea.rs │ │ │ ├── textarea_disabled.rs │ │ │ ├── textarea_with_button.rs │ │ │ ├── textarea_with_label.rs │ │ │ └── textarea_with_text.rs │ │ ├── button │ │ │ ├── button.rs │ │ │ ├── button_link.rs │ │ │ ├── button_ghost.rs │ │ │ ├── button_outline.rs │ │ │ ├── button_secondary.rs │ │ │ ├── button_destructive.rs │ │ │ ├── button_with_icon.rs │ │ │ ├── button_loading.rs │ │ │ ├── button_icon.rs │ │ │ └── button_as_child.rs │ │ ├── breadcrumb │ │ │ ├── breadcrumb_responsive.rs │ │ │ ├── breadcrumb_separator.rs │ │ │ ├── breadcrumb_link.rs │ │ │ ├── breadcrumb_ellipsis.rs │ │ │ └── breadcrumb_dropdown.rs │ │ ├── label.rs │ │ ├── table.rs │ │ ├── avatar.rs │ │ ├── avatar │ │ │ └── avatar.rs │ │ ├── separator.rs │ │ ├── pagination.rs │ │ ├── aspect_ratio.rs │ │ ├── label │ │ │ └── label.rs │ │ ├── skeleton │ │ │ ├── skeleton.rs │ │ │ └── skeleton_card.rs │ │ ├── alert │ │ │ ├── alert.rs │ │ │ └── alert_destructive.rs │ │ ├── switch.rs │ │ ├── card.rs │ │ ├── skeleton.rs │ │ ├── aspect_ratio │ │ │ └── aspect_ratio.rs │ │ ├── alert.rs │ │ ├── badge.rs │ │ ├── separator │ │ │ └── separator.rs │ │ ├── textarea.rs │ │ ├── breadcrumb.rs │ │ ├── input.rs │ │ ├── pagination │ │ │ └── pagination.rs │ │ ├── components │ │ │ └── ui.rs │ │ └── button.rs │ ├── new_york │ │ ├── components.rs │ │ ├── input │ │ │ ├── input_form.rs │ │ │ ├── input.rs │ │ │ ├── input_disabled.rs │ │ │ ├── input_file.rs │ │ │ ├── input_with_label.rs │ │ │ ├── input_with_button.rs │ │ │ └── input_with_text.rs │ │ ├── switch │ │ │ ├── switch_form.rs │ │ │ └── switch.rs │ │ ├── badge │ │ │ ├── badge.rs │ │ │ ├── badge_outline.rs │ │ │ ├── badge_secondary.rs │ │ │ └── badge_destructive.rs │ │ ├── button │ │ │ ├── button.rs │ │ │ ├── button_link.rs │ │ │ ├── button_ghost.rs │ │ │ ├── button_outline.rs │ │ │ ├── button_secondary.rs │ │ │ ├── button_destructive.rs │ │ │ ├── button_with_icon.rs │ │ │ ├── button_loading.rs │ │ │ ├── button_icon.rs │ │ │ └── button_as_child.rs │ │ ├── textarea │ │ │ ├── textarea_form.rs │ │ │ ├── textarea.rs │ │ │ ├── textarea_disabled.rs │ │ │ ├── textarea_with_button.rs │ │ │ ├── textarea_with_label.rs │ │ │ └── textarea_with_text.rs │ │ ├── breadcrumb │ │ │ ├── breadcrumb_responsive.rs │ │ │ ├── breadcrumb_separator.rs │ │ │ ├── breadcrumb_link.rs │ │ │ ├── breadcrumb_ellipsis.rs │ │ │ └── breadcrumb_dropdown.rs │ │ ├── label.rs │ │ ├── table.rs │ │ ├── avatar.rs │ │ ├── avatar │ │ │ └── avatar.rs │ │ ├── separator.rs │ │ ├── pagination.rs │ │ ├── aspect_ratio.rs │ │ ├── label │ │ │ └── label.rs │ │ ├── skeleton │ │ │ ├── skeleton.rs │ │ │ └── skeleton_card.rs │ │ ├── switch.rs │ │ ├── alert │ │ │ ├── alert.rs │ │ │ └── alert_destructive.rs │ │ ├── card.rs │ │ ├── aspect_ratio │ │ │ └── aspect_ratio.rs │ │ ├── skeleton.rs │ │ ├── alert.rs │ │ ├── badge.rs │ │ ├── separator │ │ │ └── separator.rs │ │ ├── textarea.rs │ │ ├── breadcrumb.rs │ │ ├── input.rs │ │ ├── pagination │ │ │ └── pagination.rs │ │ ├── components │ │ │ └── ui.rs │ │ └── button.rs │ ├── main.rs │ └── app.rs │ ├── Trunk.toml │ ├── index.html │ └── main.js ├── .github ├── FUNDING.yml ├── renovate.json └── workflows │ ├── labels.yml │ └── ci.yml ├── .prettierrc.json ├── components.toml ├── package.json ├── deny.toml ├── LICENSE.md ├── .pre-commit-config.yaml ├── Cargo.toml └── README.md /scripts/src/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .vite/ 2 | target/ 3 | -------------------------------------------------------------------------------- /packages/leptos/utils/src/default.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/leptos/utils/src/new_york.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/shadcn/src/commands/add.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/shadcn/src/commands/diff.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /book/src/getting-started/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | -------------------------------------------------------------------------------- /book-examples/leptos/src/default/components.rs: -------------------------------------------------------------------------------- 1 | pub mod ui; 2 | -------------------------------------------------------------------------------- /book-examples/leptos/src/new_york/components.rs: -------------------------------------------------------------------------------- 1 | pub mod ui; 2 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/components.rs: -------------------------------------------------------------------------------- 1 | pub mod ui; 2 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/components.rs: -------------------------------------------------------------------------------- 1 | pub mod ui; 2 | -------------------------------------------------------------------------------- /book/theme/theme.css: -------------------------------------------------------------------------------- 1 | table { 2 | margin: unset; 3 | } 4 | -------------------------------------------------------------------------------- /packages/shadcn/src/preflights.rs: -------------------------------------------------------------------------------- 1 | pub mod preflight_init; 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: RustForWeb 2 | open_collective: rustforweb 3 | -------------------------------------------------------------------------------- /packages/yew/aspect-ratio/src/default.rs: -------------------------------------------------------------------------------- 1 | pub use radix_yew_aspect_ratio::*; 2 | -------------------------------------------------------------------------------- /packages/yew/aspect-ratio/src/new_york.rs: -------------------------------------------------------------------------------- 1 | pub use radix_yew_aspect_ratio::*; 2 | -------------------------------------------------------------------------------- /packages/shadcn/src/commands.rs: -------------------------------------------------------------------------------- 1 | pub mod add; 2 | pub mod diff; 3 | pub mod init; 4 | -------------------------------------------------------------------------------- /scripts/src/bin/templates/base_styles.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /packages/shadcn/src/lib.rs: -------------------------------------------------------------------------------- 1 | // TODO: remove 2 | #![allow(unused)] 3 | 4 | pub mod commands; 5 | mod preflights; 6 | mod utils; 7 | -------------------------------------------------------------------------------- /packages/shadcn/src/utils.rs: -------------------------------------------------------------------------------- 1 | pub mod errors; 2 | pub mod get_project_info; 3 | pub mod highlighter; 4 | pub mod logger; 5 | pub mod spinner; 6 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["github>RustForWeb/.github:renovate-config"] 4 | } 5 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["prettier-plugin-tailwindcss"], 3 | "bracketSpacing": false, 4 | "printWidth": 120, 5 | "singleQuote": true, 6 | "tabWidth": 4 7 | } 8 | -------------------------------------------------------------------------------- /components.toml: -------------------------------------------------------------------------------- 1 | style = "default" 2 | 3 | [tailwind] 4 | config = "tailwind.config.js" 5 | css = "src/styles/global.css" 6 | base_color = "slate" 7 | css_variables = true 8 | prefix = "" 9 | -------------------------------------------------------------------------------- /book-examples/leptos/Trunk.toml: -------------------------------------------------------------------------------- 1 | [[hooks]] 2 | stage = "pre_build" 3 | command = "sh" 4 | command_arguments = [ 5 | "-c", 6 | "npx tailwindcss -i style/tailwind.css -o style/tailwind.output.css", 7 | ] 8 | -------------------------------------------------------------------------------- /book-examples/yew/Trunk.toml: -------------------------------------------------------------------------------- 1 | [[hooks]] 2 | stage = "pre_build" 3 | command = "sh" 4 | command_arguments = [ 5 | "-c", 6 | "npx tailwindcss -i style/tailwind.css -o style/tailwind.output.css", 7 | ] 8 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/input/input_form.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | // use crate::default::components::ui::input::Input; 4 | 5 | #[function_component] 6 | pub fn InputForm() -> Html { 7 | html! { 8 | // TODO 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/switch/switch_form.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | // use crate::default::components::ui::switch::Switch; 4 | 5 | #[function_component] 6 | pub fn SwitchForm() -> Html { 7 | html! { 8 | // TODO 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/input/input_form.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | // use crate::new_york::components::ui::input::Input; 4 | 5 | #[function_component] 6 | pub fn InputForm() -> Html { 7 | html! { 8 | // TODO 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/badge/badge.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::default::components::ui::badge::Badge; 4 | 5 | #[function_component] 6 | pub fn BadgeDemo() -> Html { 7 | html! { 8 | {"Badge"} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/switch/switch_form.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | // use crate::default::components::ui::switch::Switch; 4 | 5 | #[function_component] 6 | pub fn SwitchForm() -> Html { 7 | html! { 8 | // TODO 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/leptos/src/default/badge/badge.rs: -------------------------------------------------------------------------------- 1 | use leptos::prelude::*; 2 | 3 | use crate::default::components::ui::badge::Badge; 4 | 5 | #[component] 6 | pub fn BadgeDemo() -> impl IntoView { 7 | view! { 8 | {"Badge"} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/textarea/textarea_form.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | // use crate::default::components::ui::textarea::Textarea; 4 | 5 | #[function_component] 6 | pub fn TextareaForm() -> Html { 7 | html! { 8 | // TODO 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/badge/badge.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::new_york::components::ui::badge::Badge; 4 | 5 | #[function_component] 6 | pub fn BadgeDemo() -> Html { 7 | html! { 8 | {"Badge"} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/leptos/src/new_york/badge/badge.rs: -------------------------------------------------------------------------------- 1 | use leptos::prelude::*; 2 | 3 | use crate::new_york::components::ui::badge::Badge; 4 | 5 | #[component] 6 | pub fn BadgeDemo() -> impl IntoView { 7 | view! { 8 | {"Badge"} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/button/button.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::default::components::ui::button::Button; 4 | 5 | #[function_component] 6 | pub fn ButtonDemo() -> Html { 7 | html! { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/button/button.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::new_york::components::ui::button::Button; 4 | 5 | #[function_component] 6 | pub fn ButtonDemo() -> Html { 7 | html! { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/textarea/textarea_form.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | // use crate::new_york::components::ui::textarea::Textarea; 4 | 5 | #[function_component] 6 | pub fn TextareaForm() -> Html { 7 | html! { 8 | // TODO 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/leptos/src/default/button/button.rs: -------------------------------------------------------------------------------- 1 | use leptos::prelude::*; 2 | 3 | use crate::default::components::ui::button::Button; 4 | 5 | #[component] 6 | pub fn ButtonDemo() -> impl IntoView { 7 | view! { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/leptos/src/new_york/button/button.rs: -------------------------------------------------------------------------------- 1 | use leptos::prelude::*; 2 | 3 | use crate::new_york::components::ui::button::Button; 4 | 5 | #[component] 6 | pub fn ButtonDemo() -> impl IntoView { 7 | view! { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/input/input.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::default::components::ui::input::Input; 4 | 5 | #[function_component] 6 | pub fn InputDemo() -> Html { 7 | html! { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/src/new_york/input/input.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::new_york::components::ui::input::Input; 4 | 5 | #[function_component] 6 | pub fn InputDemo() -> Html { 7 | html! { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /book-examples/yew/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /book-examples/leptos/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /book-examples/yew/src/default/textarea/textarea.rs: -------------------------------------------------------------------------------- 1 | use yew::prelude::*; 2 | 3 | use crate::default::components::ui::textarea::Textarea; 4 | 5 | #[function_component] 6 | pub fn TextareaDemo() -> Html { 7 | html! { 8 |