+
+ {#if textarea}
+ {#if useCharCounter}
+
{renderMaxLength}
+ {/if}
+
+ {:else}
+ {#if renderLeadingIcon}
+
+ {/if}
+
+ {#if renderTrailingIcon}
+
+ {/if}
+ {#if variant !== 'outlined'}
+
+ {/if}
+ {/if}
+ {#if useNotchedOutline}
+
+ {#if useLabel}
+
+ {/if}
+
+ {:else if useLabel}
+
+ {/if}
+
+
+
+
{!!errorText ? errorText : helperText}
+ {#if useCharCounter && !textarea}
+
{renderMaxLength}
+ {/if}
+
+
+
+
diff --git a/packages/materialdesign-components/src/Textfield/_index.scss b/packages/materialdesign-components/src/Textfield/_index.scss
new file mode 100644
index 0000000000..a4986aaac7
--- /dev/null
+++ b/packages/materialdesign-components/src/Textfield/_index.scss
@@ -0,0 +1,5 @@
+@import "@material/textfield/mdc-text-field.scss";
+@import "@material/line-ripple/mdc-line-ripple.scss";
+@import "./mixins.scss";
+
+@include bbmd-textfield-styles();
diff --git a/packages/materialdesign-components/src/Textfield/_mixins.scss b/packages/materialdesign-components/src/Textfield/_mixins.scss
new file mode 100644
index 0000000000..b9ddfdc662
--- /dev/null
+++ b/packages/materialdesign-components/src/Textfield/_mixins.scss
@@ -0,0 +1,45 @@
+@import "@material/feature-targeting/_functions.scss";
+@import "@material/feature-targeting/_mixins.scss";
+
+@mixin bbmd-textfield-styles($query: mdc-feature-all()) {
+ $feat-structure: mdc-feature-create-target($query, structure);
+
+ .mdc-text-field {
+ &.bbmd-mdc-text-field--size-small {
+ @include mdc-text-field-height(48px);
+ }
+
+ &.bbmd-mdc-text-field--size-large {
+ @include mdc-text-field-height(64px);
+ }
+
+ &.bbmd-mdc-text-field--colour-secondary {
+ &.mdc-text-field--focused {
+ .mdc-floating-label--float-above {
+ color: var(--mdc-theme-secondary);
+ }
+ }
+ .mdc-line-ripple--active {
+ background-color: var(--mdc-theme-secondary);
+ }
+
+ &.mdc-text-field--outlined,
+ &.mdc-text-field--textarea {
+ @include mdc-text-field-focused-outline-color(secondary);
+ }
+ }
+
+ &.bbmd-mdc-text-field--variant-standard {
+ @include mdc-text-field-fill-color(transparent);
+ &:before {
+ background-color: transparent;
+ }
+ }
+ + .mdc-text-field-helper-line {
+ @include mdc-feature-targets($feat-structure) {
+ padding-right: 0px;
+ padding-left: 0px;
+ }
+ }
+ }
+}
diff --git a/packages/materialdesign-components/src/Textfield/index.js b/packages/materialdesign-components/src/Textfield/index.js
new file mode 100644
index 0000000000..3e7621688d
--- /dev/null
+++ b/packages/materialdesign-components/src/Textfield/index.js
@@ -0,0 +1,2 @@
+import "./_index.scss"
+export { default as textfield } from "./Textfield.svelte"
\ No newline at end of file
diff --git a/packages/materialdesign-components/src/index.js b/packages/materialdesign-components/src/index.js
index c003d70869..adec0891b5 100644
--- a/packages/materialdesign-components/src/index.js
+++ b/packages/materialdesign-components/src/index.js
@@ -1,4 +1,5 @@
export { default as h1 } from "./H1.svelte";
+
export { default as icon } from "./Icon.svelte";
export { button } from "./Button";
-
+export { textfield } from "./Textfield";