Skip to main content

Theme

Struct Theme 

Source
pub struct Theme {
Show 69 fields pub name: String, pub primary_color: PrimaryColor, pub radius_scale: RadiusScale, pub glow_mode: GlowMode, pub surface_0: String, pub surface_1: String, pub surface_2: String, pub surface_3: String, pub root: String, pub header: String, pub sidebar: String, pub sidebar_link: String, pub sidebar_link_active: String, pub content: String, pub surface: String, pub panel: String, pub banner: String, pub border: String, pub border_subtle: String, pub border_accent: String, pub text_accent: String, pub text_accent_bright: String, pub glow: String, pub glow_button: String, pub glow_card: String, pub glow_input: String, pub glow_badge: String, pub glow_modal: String, pub glow_alert: String, pub glow_dropdown: String, pub glow_notification: String, pub glow_switch: String, pub glow_checkbox: String, pub button_primary: String, pub button_secondary: String, pub button_outline: String, pub button_ghost: String, pub button_danger: String, pub button_success: String, pub card_base: String, pub card_header: String, pub card_footer: String, pub card_shadow_none: String, pub card_shadow_sm: String, pub card_shadow_md: String, pub card_shadow_lg: String, pub card_shadow_xl: String, pub input_base: String, pub input_normal_border: String, pub input_error_border: String, pub badge_default: String, pub badge_primary: String, pub badge_success: String, pub badge_warning: String, pub badge_danger: String, pub badge_outline: String, pub navbar_base: String, pub modal_backdrop: String, pub modal_dialog: String, pub modal_header: String, pub modal_close: String, pub alert_info: String, pub alert_success: String, pub alert_warning: String, pub alert_danger: String, pub alert_title_info: String, pub alert_title_success: String, pub alert_title_warning: String, pub alert_title_danger: String,
}
Expand description

Struttura centrale del tema per Shadow Design ispirata a Mantine / Craft UI.

Fields§

§name: String§primary_color: PrimaryColor§radius_scale: RadiusScale§glow_mode: GlowMode§surface_0: String§surface_1: String§surface_2: String§surface_3: String§root: String§header: String§sidebar: String§sidebar_link: String§sidebar_link_active: String§content: String§surface: String§panel: String§banner: String§border: String§border_subtle: String§border_accent: String§text_accent: String§text_accent_bright: String§glow: String§glow_button: String§glow_card: String§glow_input: String§glow_badge: String§glow_modal: String§glow_alert: String§glow_dropdown: String§glow_notification: String§glow_switch: String§glow_checkbox: String§button_primary: String§button_secondary: String§button_outline: String§button_ghost: String§button_danger: String§button_success: String§card_base: String§card_header: String§card_footer: String§card_shadow_none: String§card_shadow_sm: String§card_shadow_md: String§card_shadow_lg: String§card_shadow_xl: String§input_base: String§input_normal_border: String§input_error_border: String§badge_default: String§badge_primary: String§badge_success: String§badge_warning: String§badge_danger: String§badge_outline: String§navbar_base: String§modal_backdrop: String§modal_dialog: String§modal_header: String§modal_close: String§alert_info: String§alert_success: String§alert_warning: String§alert_danger: String§alert_title_info: String§alert_title_success: String§alert_title_warning: String§alert_title_danger: String

Implementations§

Source§

impl Theme

Source

pub fn shadow() -> Self

Tema di default Shadow Design (Ultraviolet Obsidian: Nero profondo con accenti viola e specular highlights).

Source

pub fn obsidian() -> Self

Preset Obsidian Titanium (Monocromatico rigoroso con accenti grafite e metallo).

Source

pub fn crimson() -> Self

Preset Crimson Phoenix (Nero profondo con fiamme cremisi fenice).

Source

pub fn cyan() -> Self

Preset Cyber Cyan (Nero profondo con accenti ciano elettrico ad alto contrasto).

Source

pub fn emerald() -> Self

Preset Emerald Matrix (Nero profondo con verde smeraldo ad altissima nitidezza).

Source

pub fn apply_primary_color(&mut self, color: PrimaryColor)

Applica un colore primario aggiornando tutti i token cromatici associati.

Source

pub fn apply_radius_scale(&mut self, radius: RadiusScale)

Applica una scala globale del raggio di curvatura.

Source

pub fn apply_glow_mode(&mut self, glow: GlowMode)

Applica una modalità di intensità per il micro-glow, ricalcolando tutti i componenti.

Source

pub fn component_glow(&self, component: &str) -> &str

Restituisce la classe di glow configurata per un dato componente.

Source

pub fn is_component_glow_enabled( &self, component: &str, override_glow: Option<bool>, ) -> bool

Risolve se il glow è attivo per un componente tenendo conto dell’override opzionale.

Source

pub fn with_name(self, name: impl Into<String>) -> Self

Source

pub fn with_primary(self, button_primary: impl Into<String>) -> Self

Source

pub fn with_card_base(self, card_base: impl Into<String>) -> Self

Source

pub fn with_glow(self, glow: impl Into<String>) -> Self

Source

pub fn with_component_glow( self, component: &str, glow: impl Into<String>, ) -> Self

Source

pub fn button_variant_classes(&self, variant: ButtonVariant) -> &str

Source

pub fn card_shadow_classes(&self, shadow: CardShadow) -> &str

Source

pub fn badge_variant_classes(&self, variant: BadgeVariant) -> &str

Source

pub fn alert_variant_classes(&self, variant: AlertVariant) -> &str

Source

pub fn alert_title_classes(&self, variant: AlertVariant) -> &str

Trait Implementations§

Source§

impl Clone for Theme

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Theme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Theme

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Theme

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Theme

Auto Trait Implementations§

§

impl Freeze for Theme

§

impl RefUnwindSafe for Theme

§

impl Send for Theme

§

impl Sync for Theme

§

impl Unpin for Theme

§

impl UnsafeUnpin for Theme

§

impl UnwindSafe for Theme

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DependencyElement for T
where T: 'static + PartialEq + Clone,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> InitializeFromFunction<T> for T

Source§

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

Source§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
Source§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Source§

fn super_from(input: T) -> O

Convert from a type to another type.
Source§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Source§

fn super_into(self) -> O

Convert from a type to another type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more